Page 1 of 1

How to match nested tags?

Posted: Sat Apr 25, 2009 2:07 am
by mathewzhao
Hi,
A string has the following style.
I want to use regex(perl) to match it,but it's beyond my ability.
Could someone give me a hand?
Thanks!

<AAA
111
222
<AAA
333
444
/AAA>
555
666
/AAA>

Re: How to match nested tags?

Posted: Sat Apr 25, 2009 2:20 am
by prometheuzz

Code: Select all

/(?s).*/