Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

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

Description

A password regex that has to have at least 1 uppercase caracter, 1 lowercase caracter, 1 special caracter and a digit

Submitted by MestreMurai - 8 years ago