Javascript - invalid quantifier error, can someone help me see my mistake?
<p>I'm not a JS guru, but could someone help me find the invalid quantifier error in the following snippet?</p>

<p>THANKS IN ADVANCE!
-mprototype</p>

<pre><code>function $_GET(q,s) {
        s = s ? s : window.location.search;
        var re = new RegExp( '&amp;' + q + '(?:=([^&amp;]*))?(?=&amp;|$)' , 'i' );
        return (s=s.replace(/^?/,'&amp;').match(re)) ? (typeof s[1] == 'undefined' ? '' : decodeURIComponent(s[1])) : undefined;
    } 
</code></pre>
