title: Using jQuery to Remove Formatting
body: <p>I have a text box, a social security text box, that has a mask on it.</p>
  
  <p>So when it is typed into the text box, it comes out as:
  123-45-6789</p>
  
  <p>But when I send it to the database, I want to strip the dashes (-). I have tried</p>
  
  <pre><code>SSN = ($('#SSNField').val()).replace("-", "");
  </code></pre>
  
  <p>But this only removes the first instance of dash, so it gets sent to the database as</p>
  
  <p>12345-6789</p>
  
  <p>I have also tried <code>replaceAll</code>, but I get the error "Object doesn't support this property or method."</p>
  
  <p>Any suggestions?</p>