Regular Expressions 101

Community Patterns

1...34567...581

Password validation

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 - a year ago