Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^((?=\S*?[A-Z])(?=\S*?[a-z])(?=\S*?[0-9])(?=\S*?(?:\W|_)).{8,})$
/
g

Description

Password requirements:

Contains at least one uppercase letter. Contains at least one lowercase letter. Contains at least one digit. Does not contain any whitespace characters. Has a minimum length of 8 characters.

Submitted by anonymous - 2 years ago