That doesn't work. I must be doing something wrong:
#!perl $a = 'A<div>B<div>C<div>D</div>E</div>F</div>G'; $a =~ m%<div>((?:(?!</div>).)*)</div>%; print "=$1=\n";
I want to get just =D=. Also tried variations of this advanced patterns like look-behind without success.
In reply to Re^4: regular expression and nested tags
by vitoco
in thread regular expression and nested tags
by vitoco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |