Skip to content

Instantly share code, notes, and snippets.

View Adebayo-Adesegun's full-sized avatar
💭
Taking over the world one step at a time

Adesegun A. Daniel Adebayo-Adesegun

💭
Taking over the world one step at a time
View GitHub Profile
@Adebayo-Adesegun
Adebayo-Adesegun / strong-password-regex.md
Created May 8, 2022 17:30 — forked from arielweinberger/strong-password-regex.md
Strong password Regular Expression - NestJS Course
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/