title: preg_match(): Compilation failed: nothing to repeat at offset 2
body: <p>I can't figure out why my regular expression is breaking. </p>
  
  <p>I want it to match:</p>
  
  <p>$100,000 </p>
  
  <p>100,000</p>
  
  <p>100000 (I know it doesn't match this, but I want it to)</p>
  
  <pre><code>preg_match("/^\$?(?!0.00)\d{1,3}(,\d{3})*(\.\d\d)?$/", $string);
  </code></pre>
  
  <p>So how can I make it match the last one too, and why am i getting this error? This regular expression works fine in my javascript check.</p>
  
  <p>Thanks</p>