title: Validate negative and positive decimal numbers with RegEx
body: <p>I am trying to build a regex which will allow both negative and positive decimal numbers with the following rules.</p>
  
  <ol>
  <li>there can not be more than 2 digits after decimal point</li>
  <li>Decimal point is optional</li>
  <li>Total length including decimal point should not exceed 12 char</li>
  <li>if no decimal point is there, max length should not exceed 9 char</li>
  </ol>
  
  <p>Can anyone help me out? thanks a lot in advance.</p>