Regular Expressions 101

Community Patterns

PASSWORD VALIDATION (FX8DY0/1)

0

Regular Expression
PCRE (PHP <7.3)

/
^((?=\S*?[A-Z])(?=\S*?[a-z])(?=\S*?[0-9]).{6,})\S$
/

Description

Checks that a password has a minimum of 6 characters, at least 1 uppercase letter, 1 lowercase letter, and 1 number with no spaces.

Submitted by Dat.Dao - 8 years ago