Regular Expressions 101

Password validation

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])[\w!@#$%]{6,}$
/
gm

Description

Check if the string has a minimum of 6 characters, at least 1 upper case char, at least 1 lower case char and at least 1 number with no spaces.

Submitted by Webchef.de