Regular Expressions 101

Community Patterns

1...45678...901

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*?[!@#$%^&*()_+<>?])[A-Za-z\d!@#$%^&*()_+<>?]{6,50}$
/
gm

Description

Password validator: 6-50 symbols Minimum 1 each: Upper case letter, Lower case letter, number, special symbol (!, @, #, $, %, ^, &, *, (, ), _, +, <, >, ?). No other symbols allowed.

Submitted by anonymous - 2 years ago