title: Regular expression for numbers with decimal
body: <p>In my phonegap app I need to validate the textbox with regular expression which should contain only numbers and two decimal places.</p>
  
  <p>Here is sample I have tried:</p>
  
  <pre><code>rexp: /^-?\d+\.?\d*$/
  </code></pre>
  
  <p>This code allows only numbers but after the dot(.) its accepting many numbers. But I should allow only two. Please guide me to solve this issue.</p>