the split \ replace functions does not recoganize "\" charcter.
example:
i need to take just the file name (new.gif) from this dynamic string.
"C:\windows\programfiles\new.gif"
i did the following
var arr;
var len;
var fil;
var temp
temp= "C:\windows\programfiles\new.gif";
arr = temp.split("\");
len = arr.length;
fil = arr[len-1];
alert(fil);
it gave me an error.
if i give the following
var arr;
var len;
var fil;
var temp
temp= "C:windows:programfiles:new.gif";
arr = temp.split(":");
len = arr.length;
fil = arr[len-1];
alert(fil);
it worked !
how can i solve this problem ?