title: Regular expression for validating numeric values
body: <p>I current have the following regular expression to accept any numeric value that is seven digits</p>
  
  <p><code>^\d{7}</code></p>
  
  <p>How do I improve it so it will accept numeric values that are seven or ten digits?</p>
  
  <p>Pass: 0123456, 1234567, 0123456789, 123467890<br />
  Fail: 123456, 12345678, 123456789</p>