Regular expression to validate password strength

The following regular expression checks:

  • Length at least 6 charachters
  • Contains at least one uppercase letter
  • Contains at least one lowercase letter
  • Contains at least one digit
"(?=.{6,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).*

Post a Comment

Previous Post Next Post