Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[-+_!@#$%^&*., ?])
/
gm

Description

Determines if string contains: 1 Uppercase 1 Lowercase 1 Number 1 Symbol

Submitted by Rae - 3 years ago