Regular Expressions 101

Community Patterns

Comments in XML document

1

Regular Expression
PCRE (PHP <7.3)

/
<!--((.[\r\n])|(.))*?-->
/
g

Description

Match comments in a XML document.

Submitted by Jared Rummler - 10 years ago