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
/
^((?:::|[^:])*+):(?!.*(?<!:):(?!:))
/
gm
Input 1
1
New
JohnP: random text here BobF::student: random text here (this is valid because there's only ONE occurrence of a single colon. the other is a double colon) Paris: random text here::student (valid for the same reason as above) JohnP: student: random text here BobF::student: random text here: more Bill:: xyz
Extraction