title: JS regex: replace all digits in string
body: <p>I need to replace all digits.</p>
  
  <p>My function only replaces the first digit.</p>
  
  <pre><code>var s = "04.07.2012";
  alert(s.replace(new RegExp("[0-9]"), "X")); // returns "X4.07.2012"
                                              // should be XX.XX.XXXX"
  </code></pre>