Maybe it is now time for you to look at one of the proven and tested methods of using an HTML parser, like HTML::HeadParser or HTML::Parser? They all know about how to parse tags.
In reply to Re^3: Help with RegEx
by Corion
in thread Help with RegEx
by mr_p
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |