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
/
^[^\W_]+(?:[-_.][^\W_]+){0,3}$
/
gm
Input 1
1
New
exampletag example-tag ex-ample-tag ex_ample_tag ex-ample_tag ex.am-ple_tag Ex.4m-p1e_t4g ex-am-pl-et-ag // and variations where there's more than 3 `-` `_` or `.` -exampletag // no starting symbols exampletag- // no trailing symbols
Extraction
exampletag example-tag ex-ample-tag ex_ample_tag ex-ample_tag ex.am-ple_tag Ex.4m-p1e_t4g ex-am-pl-et-ag // and variations where there's more than 3 `-` `_` or `.` -exampletag // no starting symbols exampletag- // no trailing symbols