I think that your best bet for this task would be to use HTML::Parser or one of its subclasses (HTML::TokeParser seems most appropriate). Any solution that doesn't use a real parser will come up against limitations eventually.
--In reply to Re: Stripping tags from a PerlMonks page.
by davorg
in thread Stripping tags from a PerlMonks page.
by dmtelf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |