Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{5,10}$
/

Description

To check a password between 5 to 10 characters which contain at least one lowercase letter, one uppercase letter, one numeric digit, and one special character.

Submitted by RathnaKumar - 9 years ago