Best explained with an example you can fiddle with: http://jsfiddle.net/F4H46/
To summarize:
(a) JQuery script is fired by clicking an anchor tag.
(b) Desired result: get chars following the href id=? and save to variables
(c) $(this)[0] does contain the correct href
(d) Using .match(regex) to strip off the desired chars creates a 404 error.
Why a 404 error? The .match(regex) works PERFECTLY if the same string is hard-coded.