Regular Expressions 101

Community Patterns

C# Regex Extract/Match Nested HTML Elements/Tags

3

Regular Expression
.NET (C#)

@"
<div id=""target""((?'nested'<div)|</div(?'-nested')|[\w\W]*?)*</div>
"
gm

Description

Loading markdown...
Submitted by w4po - 2 years ago
(Last modified 4 months ago)