title: Regular Expression to accept only positive numbers and decimals
body: <p>I need a regular expression in javascript that will accept only positive numbers and decimals.  This is what I have but something is wrong -- it doesn't seem to take single positive digits.  </p>
  
  <pre><code>/^[-]?[0-9]+[\.]?[0-9]+$/;
  </code></pre>
  
  <p>For example, <code>9</code> will not work. How can I restructure this so if there is at least one positive digit, it will work?</p>