title: Java regex - How to read numbers only 5 to 7 digits
body: <p>I have following now.</p>
  
  <pre><code>regex=^[0-9]{6}$
  </code></pre>
  
  <p>this is working for starting 0 to 9 and for 6 and 7 digit number.</p>
  
  <p>Please suggest how can i add for 5, 6 and 7 digit numbers. </p>