Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How to clear all html tag in document?
May 28, 2005, 1:48 pm
rate this thread
How to clear all html tag in line (or document) ?
All tags have "<" on start, and ">" at the end of tag. Eg <table>, </table>,
<div align="left">, <td align="left" bgcolor="#000099"> ....
I make program that work character by character, and control if is start is
"<", and end ">".
Please help me I now those Perl programmers do that on easier way! How?
Re: How to clear all html tag in document?
* max schrieb:
I suggest to use the module HTML::Strip, it is doing exactly what you
want. Have a look at
With that all you have to do is something like
my $html = "<div><b>foo</b> bar</div> baz";
my $text = HTML::Strip->new->parse( $html );
foo bar baz