DEV Community

Discussion on: Write Regex Pattern for Password Validation Like a Pro

Collapse
 
katafrakt profile image
Paweł Świątkowski

In Pattern 1:

(?!.*[0-9]) means that the password must contain a single digit from 1 to 9.

Actually, it means it must not contain a digit ;) - I guess it's a typo in the regex part, because full regex correctly contains (?=.*[0-9])

Collapse
 
rasaf_ibrahim profile image
Rasaf Ibrahim

Thanks for mentioning. 🎉 I've corrected it.