Other Resources:
Validating Complexity and Length of Passwords
How to write a regular expression to check the complexity and length of passwords with the following requirements:
For example, Br1ckBe@k is a valid password.
✍: Guest
![]()
Here is the regular expression to validate passwords that meet your requirements:
(?=.*[A-Z])(?=.*[a-z])(?=.*\W)(?=.*\d).{8,}
(?=.*[A-Z]) - Look-ahead for a upper case letter
(?=.*[a-z]) - Look-ahead for a lower case letter
(?=.*\W) - Look-ahead for a special character
(?=.*\d) - Look-ahead for a numeric digit
.{8,} - Matches 8 or more characters
2013-01-29, 0👍, 0💬
Popular Posts:
A free online regular expression test tool that allows to try you regular expression pattern and see...
All credit card numbers issued by Diners Club must start with 300 through 305, 36 or 38 and have 14 ...
Are you having problems using regular expressions when processing text strings in your applications ...
Are you having problems using regular expressions when processing text strings in your applications ...
How to capture the Sogou web spider entries from Web log file? Here are some Web log file entries: 1...