title: Regex in JavaScript for validating decimal numbers
body: <p>I want a regex in JavaScript for validating decimal numbers.</p>
  
  <p>It should allow only up to two decimal places. For example, it should allow <code>10.89</code> but not <code>10.899</code>. </p>
  
  <p>It should also allow only one period (<code>.</code>). For example, it should allow <code>10.89</code> but not <code>10.8.9</code>.</p>