I am trying to accept only 7 digit long number not starting with 0 or 1
7089097 - OK
0089097 - Not good
1089097 - Not good
This is what i tri
This regex will work:
^[2-9][0-9]{6}$
Out of 7 digits 1 is consumed by first position 2-9 and then next 6 digits can be from 0-9
2-9
0-9