Regular Expressions 101

Community Patterns

Find multiple XML documents in file

-2

Regular Expression
PCRE (PHP <7.3)

/
<\?xml [^?]*\?><(?<root>\w+)>(.*?)<\/\1>\n?
/
g

Description

as title says

Submitted by Doro - 10 years ago