Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[\!-\/\:-\@\[-\`\{-\~])(?:.{8})$
/
gm
Input 1
*** NOT MATCH abc abc123 abC12312 123Abc!!d *** MATCH 1Ab@1Ab@ %D123!cc # ### NOTES # - 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.
Extraction
*** NOT MATCH abc abc123 abC12312 123Abc!!d *** MATCH 1Ab@1Ab@ %D123!cc # ### NOTES # - 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.