In a message dated 9/19/2002 11:54:45 AM Eastern Daylight Time,
[EMAIL PROTECTED] writes:
> I want to parse an HTML document to get out the simple text from it.
> I've tried with HTML::Parser, but with no success. The POD documentation is
> not very good and I haven't seen any assignment as $text = ... to see how
to
> get the text.
use HTML::Parse;
use HTML::FormatText;
$text = HTML::FormatText->new->format(parse_html($html_text));
use lib if you don't have HTML::FormatText installed.
$text =~ s/<[^>]*>//gs
won't work on something like
<img
src="source"
alt="alt"
height="height"
width="width"
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]