Javascript replace expression
<p>I'm having trouble replacing some url variables in javascript. I'm trying to replace the value of <code>&amp;s=</code> and <code>&amp;so=</code>. Below is my code:</p>

<pre><code>url = url.replace(/(s=).*?(&amp;)/, '$1' + $("#sort_by").val() + '$2');
url = url.replace(/(so=).*?(&amp;)/, '$1' + $("#sort_ord").val() + '$2');
</code></pre>

<p>The first replace works no problem, the <code>s</code> value is always replaced, but the <code>so</code> variable never seems to get replaced.</p>
