Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?=.{8}$)(?:\d*[a-z]){2}\d*$
/
gm
Input 1
1
New
a123456b 1a2b3456 aa123456 123ab456 And the bad samples: 1abcdefg2 a1234567b abcdefgh 12345678