Hey everyone, here is what I'm trying to do. I'm trying to change one part of a url with something new but I can't seem to get the regexp pattern to work. I just want to match the varname, the equal sign and the number (age=21)

HTML Code:
<a href="#" onclick="change('age', '85');">Change AGE to 85</a>

function change(varname, id)
    var url  	= "http://www.example.com/index.php?do=change&id=777&age=21";
    var newstr 	= varname + '=' + id;				
    var oldstr  = url.match(/(?=varname)\d+/)
    var newurl  = url.replace(oldstr, newstr);
    // the output should have replaced the age to 85
    // http://www.example.com/index.php?do=change&id=777&age=85
I don't know how to get the varname variable inside the match correctly. Any ideas?