Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-06-03 20:43
Updated·2021-06-03 20:44
Flavor·PCRE2 (PHP)

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

Description

  • 8 characters long
  • Must include capital letters
  • Must include small letters
  • Must include numbers
  • Must include special characters
  • NOTE: Can also use [[:punct:]] for special characters but it may not be supported by your regex engine.
Submitted by anonymous