title: regex for validation of positve numbers including zeros and 2 places after decimal in java?
body: <pre><code>("^\d{1,15}(\.\d{1,2})?$") 
  </code></pre>
  
  <p>This is the regex i'm trying to use but java gives syntax error.</p>
  
  <pre><code>^(?!(?:0|0\.0|0\.00)$)[+]?\d+(\.\d|\.\d[0-9])?$
  </code></pre>
  
  <p>This one works well for numbers like 00.00, 124.03, 0.13 but not for 0.0 and 0.</p>
  
  <p>please modify the regex so that it accepts the following kind of numbers :</p>
  
  <pre><code>123456.00,
  12415366.88,
  0.23,
  0,
  0.00,
  0.0,
  432547,
  </code></pre>
  
  <p>i.e. only postive numbers which include zero and upto 2 places after decimal</p>