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
/
^.*?(?=\s*(?:Part1|Part2|Part3|Part4))
/
mg
Input 1
1
New
MatchOnlyMe! Part1 Part2 Part3 Part4 MatchOnlyMe! Part2 Part3 Part4 MatchOnlyMe! Part2 Part3 MatchOnlyMe! Part1 Part3 Part4 MatchOnlyMe! Part3 Part4 MatchOnlyMe! Part4 MatchOnlyMe! Part2 MatchOnlyMe! Part2 Part4 MatchOnlyMe! Part1 Part4 MatchOnlyMe! Part1 Part2 Part4