I have a small test to match using regex.
Match to true if and only if user has entered “0000” or 000 or 00 or 0.
0001 or 0011, 1000, 0111, 1111 should return false.
Here is what i have tried : /^0*([0]{1,4})/ but it didn’t work.
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.
This should work just fine: