title: Java Regular Expression: Remove Dashes and Whitespace Not Working
body: <p>I need to remove all dashes and whitespace. I'm having trouble with this regexp, it's not working:</p>
  
  <pre><code>private static final String USZIPCODE_REMOVE_REGEXP = "[\\-\\s]";
  
  zipCode.replaceAll(USZIPCODE_REMOVE_REGEXP, "");
  </code></pre>
  
  <p>The debugger shows an unchanged result:</p>
  
  <p>Input:</p>
  
  <pre><code>12345---6789
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>12345---6789
  </code></pre>