Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
<(\w*?)>.*<.*>
/
g

Description

Extracts attribute names from an XML file and presents them as a simple list. Affects only the attributes that have values. Ignores the "parent" attributes (that have no values but have nested attributes).

Submitted by O.Khilkevych / D.Mrachkovsyi - 9 years ago