I am using regular expressions for matching only digits, minimum 10 digits, maximum 14. I tried:
^[0-9]
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.
I’d give:
a shot.
I also like to offer extra solutions for RE engines that don’t support all that PCRE stuff so, in a pinch, you could use:
If you’re RE engine is so primitive that it doesn’t even allow specific repetitions, you’d have to revert to either some ugly hack like fully specifying the number of digits with alternate REs for 10 to 14 or, easier, just checking for:
and ensuring the length was between 10 and 14.
But that won’t be needed for this case (ASP.NET).