Regular Expressions 101

Community Patterns

Strong password

0

Regular Expression
ECMAScript (JavaScript)

/
^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[^\w\d\s:])([^\s]){8,24}$
/
gm

Description

The password must contain :

  • Between 8 and 24 chars
  • 1 lowercase
  • 1 uppercase
  • 1 number
  • 1 special char

Work with HTML5 pattern.

Submitted by valent1618 - a year ago