As mentioned in Question how can I write a regular expression to accept from 00100 to 99999.
I have written
\d{5}
But it will accept all zeros also.
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.
Alternatively you can just disallow the numbers that you don’t want to include using negative look ahead assertions:
Which does not match any five digit number that has three zeroes at the beginning which is also what you want.
See it