Regular Expressions 101

Community Patterns

1...45678...297

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