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
/
^(((::){0,1}[_A-z][_A-z0-9]*)+)$
/
gm
Test String
New
monkey dog dog8_ _dog8 8dog_ ::std ::monkey ::monkey::dog::cat ::monkey::8dog::cat ::frog ::7frog boost::asio ::boost::asio
Substitution
Processing...
$1