title: Regular expression to match a percentage with decimal?
body: <p>I'm attempting to build a regular expression (.NET) to match a percentage with 4 decimal places. The 4 decimal places are required. The range looks like:</p>
  
  <pre><code>0.0001 to 100.0000 
  </code></pre>
  
  <p>So far, I've come up with:</p>
  
  <pre><code>(?:[^0]+[1-100]{1,3})\.(?:\d{4})
  </code></pre>
  
  <p>However, I'm a bit unsure on how to add a few other requirements to this expression. I need:</p>
  
  <ul>
  <li>No leading zeroes before the decimal point. 42.4214 is allowed, 042.4214 is not. 1.0000 is allowed but 001.0000 is not. Etc..</li>
  <li>Up to 3 characters allowed before decimal without leading zeroes. </li>
  <li>If the number before the decimal is 100, do not allow the number after the decimal to be anything other than 0000, so 100.0000 is allowed, but 100.0135 is not allowed. (Is this even possible with a regex?)</li>
  </ul>
  
  <p>Help is appreciated! </p>