Regular Expressions 101

Community Patterns

Community Library Entry

0

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 6 characters at minimum, not spaces allowed, and at least 1 special character, 1 uppercase letter, 1 lowercase letter and a digit

Submitted by MestreMurai - 9 years ago