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
/
(text1).*(text2)|\2.*\1
/
s
Input 1
1
New
text0 asdf asdf asdf asdf asdf text1 asdf asdf text2 asdf asdf
Extraction
text0 asdf asdf asdf asdf asdf text1 asdf asdf text2 asdf asdf