Hi,

Pretend I have the following string :
Code:
var url = "http://localhost/MyWebSite/Diagnostic.aspx:8800?ID=1&AutorefreshPage=1&AutorefreshPage=z5d1a&AutorefreshPage=1&AutorefreshPage=1&AutorefreshPage=5584&AutorefreshPage=dafx&AutorefreshPage=1225aa";
And I want to remove all occurrence of string "AutorefreshPage" from url.
So all those occurrences might be removed :
- &AutorefreshPage
- &AutorefreshPage=
- &AutorefreshPage=?...?

Here is what I did, but I'm not familliar with RegEx

Code:
var url = "http://localhost/QMBGateModem/Sites/BarriersDiagnostic.aspx?ID=1&AutorefreshPage=1&AutorefreshPage=254d&AutorefreshPage=21das&AutorefreshPage=ad55d&AutorefreshPage=1&AutorefreshPage=1&AutorefreshPage=2d5a5s1";
var p = url.replace( /(AutorefreshPage=)([a-zA-Z0-9]+)&/, '' );
window.alert( p );
It seem to replace only first occurence... But I think I'm far away of the solution.

Thanks for your support