A particular regular expression is bugging me right now. I simply want to replace the range=100 in a string like
var string = '...commonstringblabla<b>&range=100&</b>stringandsoon...';
with
...commonstringblabla<b>&range=400&</b>stringandsoon...
I successfully matched the "range=100"-part with
alert( string.match(/range=100/) );
But when I try to replace it,
string.replace(/range=100/, 'range=400');
nothing happens. The string still has the range=100 in it. How can I make it work?