($text = $html) =~ s/<(\/|!)?[-.a-zA-Z0-9]*.*?>//g; #### $text =~ s/<[^>]*>//gs; # only for most simple html! $text =~ s/<([^>]|\n)*>//g; # multi-line comments?