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) <page> ( .*? (?: (?: <page> | </page> ) (*SKIP) (*FAIL) | {{Infobox ) .*? ) (?: <page> (*SKIP) (*FAIL) | </page> )
~
gx
Input 1
1
New
List of keywords : keyword1 = <page> keyword2 = </page> keyword3 = {{Infobox Example A: <page> text to consider without {{ not-Infobox </page> Result => do not extract (or keep or split) this part. Example B: <page> text to consider with {{Infobox here}} </page> Result => extract (or keep or split) this part.
Extraction
List of keywords : keyword1 = <page> keyword2 = </page> keyword3 = {{Infobox Example A: <page> text to consider without {{ not-Infobox </page> Result => do not extract (or keep or split) this part. Example B: <page> text to consider with {{Infobox here}} </page> Result => extract (or keep or split) this part.