Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?!.*([A-Z]{2,}|[0-9]{2,}))[A-Z0-9]+$
/
gm
Input 1
1
New
A 1 A1 1A A1A 1A1 A1B2C3D4 AA11 11AA A1B2CCC A1B2222