Regular Expressions 101

Community Patterns

PassWordValidation

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 - 8 years ago