title: How to validate digits (including floats) in javascript
body: <p>Currently i'm using this reg exp:</p>
  
  <pre><code>var valid = (value.match(/^\d+$/));
  </code></pre>
  
  <p>But for digits like '0.40', or '2.43' this doesn't work. How can I change that reg exp above to match floats as well?</p>