Java regex - How to read numbers only 5 to 7 digits

Viewed 30816

I have following now.

regex=^[0-9]{6}$

this is working for starting 0 to 9 and for 6 and 7 digit number.

Please suggest how can i add for 5, 6 and 7 digit numbers.

2 Answers
Related