title: Regular expression non-capturing group character length
body: <p>I'm trying to generate a regular expression with the next pattern.
  A number, of a maximum of 16 digits, that can have or not a comma inside, never at the beginning, never at the end.
  I tried this:</p>
  
  <pre><code>^(?:\d+(?:,{1}\d+){1})$
  </code></pre>
  
  <p>The problem is that I can't count the result of a group {0,16}.
  This is a list of numbers that should fit the expression:</p>
  
  <blockquote>
    <p>123,34<br>
    1,33333333<br>
    1222222233</p>
  </blockquote>
  
  <p>Example numbers that shouldn't fit:</p>
  
  <blockquote>
    <p>1111,1111,1111<br>
    ,11111<br>
    11111,<br>
    11111111111111111111111111111,111111111111111 (more than 16
    characters)</p>
  </blockquote>