var s:String = "http://www.abc.com/dump/one.htm#figure1"
var arr:Array=s.split("/");
var s2:String = arr[arr.length-1];
var s3 = s2.split("#")[0];
var s4 = s3.split("?")[0];
//s4 is the string you need.
//no matter what u try, this code will never break.
Попробуйте и дайте нам знать.