Regular Expressions 101

Community Patterns

HTML TAG WITH VALUE AND CHILDREN

1

Regular Expression
ECMAScript (JavaScript)

/
<(?<first>[^>]+)>.*?<\/(\k<first>)>
/
g

Description

This regex target each html tag with their children and their value

Submitted by Florian Caron - 2 years ago