in reply to Parsing/Extracting Data from HTML.
$htmltext =~ s/<(.*)>//g;
...will replace all tags with emptiness.
If you wish to convert br's and p's to newlines before they are stripped, add:
$htmltext =~ s/<(br|p)>/\n\n/ig;
before the first command.
Of course, you'll lose all formatting. This method is not quarenteed to properly strip comments.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Parsing/Extracting Data from HTML.
by chromatic (Archbishop) on Mar 23, 2000 at 20:48 UTC |