Community Patterns

Community Library Entry

4

Regular Expression
Created·2014-06-24 11:29
Flavor·PCRE (Legacy)

/
<child\s+[^<]*?attr2=[\'\"](?<value>[^<]*?)[\'\"]
/
g
Open regex in editor

Description

Simple regular expression for extracting attribute value of the element in XML-string. Attribute value should be in quotes.

Submitted by Nikita Danilov