Regular Expressions 101

Community Patterns

Password check - at least 1 char, 1 numeric, 8-64 chars long

0

Regular Expression
PCRE (PHP <7.3)

/
^(?=.*[a-zA-Z])(?=.*\d)[a-zA-Z0-9~!@#$%^&*()_+}{\][";:;'?\/>;.<;,]{8,64}$
/

Description

Allows for a wide range of special characters.

If you want it to have no upper bound, remove the 64 (but leave the 8,.

Submitted by Peter Speden - 9 years ago