Regular expression for validating numeric values
- by Michael Kniskern
I current have the following regular expression to accept any numeric value that is seven digits
^\d{7}
How do I improve it so it will accept numeric value that is seven or ten digits?
Pass: 0123456, 1234567, 0123456789, 123467890
Fail: 123456, 12345678, 123456789