Password Validation | Sololearn: Learn to code for FREE!


Password Validation I'm trying to solve this problem by using Regex However the code that I have written couldn't pass the test case #8 Does anyone has any idea what's wrong with my code

5/9/2020 10:54:06 AM

Chase Chai

2 Answers

New Answer


I think "[0-9{2,}]" is not proper regex. You probably want something like "[0-9].*[0-9]" which means a digit, followed by some random stuff or nothing, followed by another digit. Same thing in the regex below. There is a great testing tool for regex at, check it out!


Thanks a lot I have solved the problem 👍