title: regexp to validate a non-zero number
body: <p>My requirement is to validate a NON-ZERO number. The regular expression that I used is the following.</p>
  
  <pre><code>^[1-9]?\d+(\.\d)?\d*$
  </code></pre>
  
  <p>VALID VALUES should be</p>
  
  <ul>
  <li>2</li>
  <li>22</li>
  <li>2222 (up to any number of digits)</li>
  <li>2.2222 (up to any number of decimal points)</li>
  </ul>
  
  <p>INVALID VALUES</p>
  
  <ul>
  <li>0</li>
  <li><ol>
  <li>(. without decimal values)</li>
  </ol></li>
  <li>0.1 (any number of decimals, but start digit is 0)</li>
  <li>2.4.5 (more than one .)</li>
  </ul>
  
  <p>basically any values starting with 0 or has more than one . or no decimal points provided when . is added, are INCORRECT.</p>