These are obvious (but too simple) solutions:($text = $html) =~ s/<(\/|!)?[-.a-zA-Z0-9]*.*?>//g;
For in-depth discussion consult Perl Cookbook Recipe 20.6 which recommends using the HTML::Parser and HTML::FormatText modules.$text =~ s/<[^>]*>//gs; # only for most simple html! $text =~ s/<([^>]|\n)*>//g; # multi-line comments?
In reply to Re: Strip HTML tags
by epoptai
in thread Strip HTML tags
by rlk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |