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
r"
(MIKE|WILL|TOM|DAVID)\s*(.*?)(?=\s*(?:MIKE|WILL|TOM|DAVID|$))
"
g
Input 1
MIKE an entry for mike WILL and here is wills text DAVID and this belongs to david
Extraction
MIKE an entry for mike WILL and here is wills text DAVID and this belongs to david