Regular Expressions 101

Community Patterns

Community Library Entry

-2

Regular Expression
PCRE (PHP <7.3)

/
<(?<key>[^>]+)>(?<value>[^<]+)<\/\1>
/
sg

Description

Basic XML key-value extraction

Submitted by Keith Muggleton - 9 years ago