Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?=\w{6,10}$)(?=[^a-z]*[a-z])(?=(?:[^A-Z]*[A-Z]){3})(?=\D*\d)\D*\d*
/
g

Description

  1. The password must have between six and ten word characters \w
  2. It must include at least one lowercase character [a-z]
  3. It must include at least three uppercase characters [A-Z]
  4. It must include at least one digit \d
Submitted by anonymous - 7 years ago