Advertisement
Mangus875

Password validation regex

Jun 3rd, 2023 (edited)
1,644
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.29 KB | Cybersecurity | 0 0
  1. /^((?=\S*?[A-Z])(?=\S*?[a-z])(?=\S*?[0-9])(?=\S*?(?:\W|_)).{8,})$/g
  2.  
  3. Password requirements:
  4. - Contains at least one uppercase letter.
  5. - Contains at least one lowercase letter.
  6. - Contains at least one digit.
  7. - Does not contain any whitespace characters.
  8. - Has a minimum length of 8 characters.
Tags: regex password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement