Regex and browser dependency
<p>Why does the following regex:</p>

<pre><code>var regex = /[^a-zA-Z0-9,-\s]/g
</code></pre>

<p>not work in Firefox and IE, but works in Safari and Chrome.</p>

<p>But if I change it to:</p>

<pre><code>var regex = /[^a-zA-Z0-9-\s,]/g
</code></pre>

<p>It works on all the above-mentioned browsers.</p>

<p>Can anybody please explain why the comma (<code>,</code>) is the bad guy here?</p>
