I have a string that's structured as so:
I'd like to be able to change the value of
Here's a place to start:
str = "http://mydomain.com/?i=0"; str = str.replace(/((?:\?|&)i=)([^&]*)/g, '$1foo');
I'm not going to do the Regex for you as you have demonstrated no attempt at doing it yourself.