title: Regex for number with minimum value and thousand separator
body: <p>I'm trying to write a regular expression to validate a number that is either just a 0 OR at least 1000 and that also allows a comma for a thousand separator.</p>
  
  <p>The closest I've got is this which validates the number part correctly but not the thousand separator.</p>
  
  <pre><code>^(([1-9]{1}[0-9]{3,})|0)$
  </code></pre>
  
  <p><strong>Test cases:</strong></p>
  
  <p>Allow:</p>
  
  <pre><code>0
  1000
  50000
  1,000
  50,000
  99,992,001
  </code></pre>
  
  <p>Not allow:</p>
  
  <pre><code>00
  0001
  999
  1,1,00
  1.000.000
  anystring
  </code></pre>