Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-11-09 18:43
Updated·2022-11-09 18:43
Flavor·JavaScript

/
(?<=.*([!-~].*){8,})(?<=.*[a-z].*)(?<=.*[A-Z].*)(?<=.*[0-9].*)(?<=.*[!-/:-@\[-`{-~].*)$
/
gm
Open regex in editor

Description

Matches any password with 8 ASCII characters (from ! to ~), 1 lowercase letter, 1 uppercase letter, 1 number and 1 symbol.

For testing multiple passwords, each one has to be in a separate line, if a password is valid, its first character is found.

Submitted by anonymous