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:
Are you having problems using regular expressions when processing text strings in your applications ...
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally...
All credit card numbers issued by American Express must start with 34 or 37 and have 15 digits. For ...
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally...
How to capture the Soso Spider entries from Web log file? Here are some Web log file entries: 127.0....