I want to mach a string with 10 digits or 9 digits.
It must match the following: 0123456789 or 123456789
I tried with this expression ^[0|\e]\d{9}$, but it is not working
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
How about this one:
This assumes 012345678 would fulfill your criteria as well; namely you can have 10 digits only if it starts with a 0, but any combination of nine digits is ok.