title: Fastest way to remove hyphens from a string
body: <p>I have IDs that look like: <strong>185-51-671</strong> but they can also have letters at the end, <strong>175-1-7b</strong></p>
  <p>All I want to do is remove the hyphens, as a pre-processing step.  Show me some cool ways to do this in javascript?  I figure there are probably quite a few questions like this one, but I'm interested to see what optimizations people will come up with for &quot;just hyphens&quot;</p>
  <p>Thanks!</p>
  <p>edit: I am using jQuery, so I guess .replace(a,b) does the trick (replacing a with b)</p>
  <pre><code>numberNoHyphens = number.replace(&quot;-&quot;,&quot;&quot;);
  </code></pre>
  <p>any other alternatives?</p>
  <p>edit #2:</p>
  <p>So, just in case anyone is wondering, the correct answer was</p>
  <pre><code>numberNoHyphens = number.replace(/-/g,&quot;&quot;);
  </code></pre>
  <p>and you need the &quot;g&quot; which is the pattern switch or &quot;global flag&quot; because</p>
  <pre><code>numberNoHyphens = number.replace(/-/,&quot;&quot;);
  </code></pre>
  <p>will only match and replace the first hyphen</p>