Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^((?=.*[0-9])(?=.*[a-z])|(?=.*[0-9])(?=.*[A-Z])|(?=.*[A-Z])(?=.*[a-z])|(?=.*[^A-Za-z0-9\s])(?=.*[a-z])|(?=.*[^A-Za-z0-9\s])(?=.*[A-Z])|(?=.*[^A-Za-z0-9\s])(?=.*[0-9])).{5,}$
/
g

Description

Policy:

  1. At least five digits.
  2. No whitspaces.
  3. Two out of four groups - digits, lowercase, uppercase, special charterers
Submitted by anonymous - 8 years ago