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][ -]?){2,16}$)(?=[^\d\n]*\d)[a-zA-Z\d]+(?:[ -][a-zA-Z\d]+)?$
/
gm
Input 1
New
test one test 2two test3 three222 3test-4four ex-itshouldpass16 -test test-d f