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 fixed the Chris function (problem with regex string!)
function updateUrlParameter(url, param, value){ var regex = new RegExp('('+param+'=)[^\&]+'); return url.replace( regex , '$1' + value); }