Need to validate passwords with next restrictions:
- at least 1 digit,
- at least 1 Latin lower case character,
- at least 1 Latin upper case character,
- at least 1 special character (not a digit, Latin lower or upper case character).
So, I wrote a regex: (?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^\\da-zA-Z])
.
However, 12345678@Cd
doesn't match this regex and I can't get why.
P.S. Maybe it's a noobie question but regular expressions were always my Achilles' heel.