Hi, i have this js code :
var str = "javascript:__doPostBack('ctl00$M$List$_rli2$ctl06','')";
alert (str);
var str = str.replace(/\$_rli\d+/, "$_rli" + 7);
alert (str);
And in IE it produces me result as follows:
javascript:__doPostBack('ctl00$M$Listjavascript:__doPostBack('ctl00$M$List$_rli2$ctl06','')rli7$ctl06','')
while it should work like this:
javascript:__doPostBack('ctl00$M$List$_rli7$ctl06','')
and it does in FF, Opera and Chrome.
It Replaces $_
with whole previous string. No escape sequences seems to help.
What am i Doing wrong?