title: Regex count number of digits excluding space
body: <p>I want to create a regular expression that will validate the following condition:</p>
  
  <ol>
  <li>Contains only numbers</li>
  <li>Only single space between numbers are allowed</li>
  <li>Total digits excluding spaces must be between 16 to 19</li>
  </ol>
  
  <p>Here is the regular expression I have so far :</p>
  
  <pre><code>^[0-9]+( [0-9]+)*$
  </code></pre>
  
  <p>Basically I got condition (1) and (2) so I really really need help for (3). Thank you for your time.</p>