Regular Expressions 101

Community Patterns

Match <?xml...?>

2

Regular Expression
PCRE (PHP <7.3)

%
<\?xml(.+?)\?>
%

Description

How to match the first line of a xml document

Submitted by anonymous - 9 years ago