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
/
^(.+)(\n.+\n.+)([\s\S]*?)(.+)\2$
/
gm
Input 1
1
New
Cucumber Overwatch Facebook Inc New York, Ny. John Stave Amazon Inc Michigan, Mi. EAAlon MasBBk Facebook Inc New York, Ny. Elon Mask Amazon Inc Michigan, Mi.
Substitution
$1, $4$2$3
Cucumber Overwatch Facebook Inc New York, Ny. John Stave Amazon Inc Michigan, Mi. EAAlon MasBBk Facebook Inc New York, Ny. Elon Mask Amazon Inc Michigan, Mi.