How do I extract "search term" from URLs?
<p>How do I extract "test" from the following URL?</p>

<p><a href="http://www.example.com/index.php?q=test&amp;=Go" rel="nofollow">http://www.example.com/index.php?q=test&amp;=Go</a></p>

<p>I've found the a script to extract the path (window.location.pathname), but I can't find or figure out how to extract or split the URL.</p>

<p>-ben</p>
