Possible to get "name" from this link?

Hi,

When I right click on certain links, is it possible to create an option in my right click menu in Firefox that would get the “name” from this link:

http://www.mysite.com/test.php?name=John&tags=blah

The name in this case is John, and have it change the link into:

http://test.othersite.com/testagain.php?name=John

Im hoping this could be done in Greasemonkey for Firefox, which is I believe all in Javascript.

Any help is very very appreciated!

First i would use window.location.search to extract the entire querystring as a string expression (the only way to do it in JS), then regex the value of the name parameter out of the string