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][a-zA-Z0-9]*(?:[ _\-][a-zA-Z0-9]+)*$
"
gm
Input 1
New
Valid: a_B a_b a b a B a_btest_psom a-B a43 b a43_c Invalid: a_ _a a- a_b_ a_B_ a_b- a_btest_psom_ 43 b 43_c 434343