title: Limit the number of digits in regex
body: <p>I have such a regex:</p>
  
  <pre><code>'(?:\$|сум)(\040)?(\d+)|(\d+)(\040)?(?:\$|сум)'
  </code></pre>
  
  <p>It matches the following strings:</p>
  
  <pre><code>$23
  23$
  1000сум
  сум1000
  сум 1000
  1000 сум
  </code></pre>
  
  <p>I want to limit the number of digits in this regex to 8. </p>
  
  <p>Tried this:</p>
  
  <pre><code>'(?:\$|сум)(\040)?(\d{, 8})|(\d{, 8})(\040)?(?:\$|сум)'
  </code></pre>
  
  <p>It stopped matching anything.</p>
  
  <p>What am I doing wrong?</p>