Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
:(::|[^:\n])+:
/
g
Input 1
1
New
:any-non-whitespace: :text1:sample2: :@(1@#$@SD: :s: :nospace::inbetween: because there are 2 colons in the middle :nospace:middle:nospace: