In Pattern 1:
(?!.*[0-9]) means that the password must contain a single digit from 1 to 9.
(?!.*[0-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])
(?=.*[0-9])
Thanks for mentioning. 🎉 I've corrected it.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In Pattern 1:
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])
Thanks for mentioning. 🎉 I've corrected it.