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-Za-z\d -\/:-@[-`{-~À-ÿ]{8,30}$)^(?:[A-Za-z\d]*[ -\/:-@[-`{-~À-ÿ]){0,3}[A-Za-z\d]*$
/
gm
Input 1
New
AABBCCDD OK -- Match aabbccdd OK -- Match 11111111 OK -- Match A1A1b2b2 OK -- Match A@~D1dIo OK -- Match AAB BCC0 OK -- Match (1 special, it's okay) AABBCC@@ OK -- Match (2 specials, it's okay) AABB C OK -- Match (3 specials, it's okay) A@~` C: OK -- Match (3 specials, it's okay) AABB OK -- Should't match and didn't match (Less than 8 symbols) AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPP OK -- Should't match and didn't match (More than 30 symbols) AA@@@@BB ERROR ! -- Shouldn't match (4 specials, it's forbidden) AAB B ERROR ! -- Shouldn't match (4 specials, it's forbidden) AABB@@@@ ERROR ! -- Shouldn't match (4 specials, it's forbidden)