title: Regular Expression in ASP.NET for decimal validation
body: <p>I am currently attempting to use a regular expression validator control in ASP.NET to validate a textbox that will be used for input for a database that accepts a decimal value.</p>
  
  <p>I want this value to accept up to 18 digits before the decimal, and 1 digit after. With the decimal point and the digit after it being optional</p>
  
  <p>For example all the following would be accepted</p>
  
  <ul>
  <li>1.0</li>
  <li>100.1</li>
  <li>123456789123456789.2</li>
  <li>123456789123456789</li>
  </ul>
  
  <p>But these examples would not</p>
  
  <ul>
  <li>1.01 </li>
  <li>1234567891234567891</li>
  <li>1234567891234567891.0</li>
  </ul>
  
  <p>I am currently using this as my regular expression, however it seems to be accepting things that are more than 18 digits before the decimal point.</p>
  
  <pre><code>^(\d{1,18})+(\.\d{1})?$
  </code></pre>
  
  <p>Anyone know what I did wrong here?</p>
  
  <p>Thanks for your help in advanced!</p>