in reply to Strip HTML tags
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?
|
|---|