title: javascript regular expression test for 6 digit numbers only. comma seperated
body: <p>and so this must pass:</p>
  
  <pre><code>454555, 939999 , 019999    ,727663
  </code></pre>
  
  <p>its for a user entering 6 digit invoice numbers. it should fail if a number is 5 or 7 digit and not 6. so <code>1234567, 123456</code> should fail, as one set is more than 6 numbers.</p>
  
  <p>So far I have :</p>
  
  <pre><code>[0-9]{6}(\s*,*,\s*[0-9]{6})*
  </code></pre>
  
  <p>which only draw back is that it accepts 7 or more digit numbers. cant figure out if its even possible at this point to do both, test for 6 digits separated by a comma and one or more space, and all the digits have to be only 6 digits and fail if one is not.</p>
  
  <p>any help appreciated. regular expressions are not my forte. </p>
  
  <p>thanks</p>
  
  <p>Norman</p>