I have a string which is something like this :
a_href= \"www.google.com/test_ref=abc\";
I need to search for test_ref=abc in thisabove stri
Based on this discussion I have created a references function. enjoy
updateUrlParameter(url, param, value){ var regex = new RegExp("/([?|&]" + param + "=)[^\&]+/"); return url.replace(regex, '$1' + value); }