Re: Facing problem with HTML::Parser
Olaf Alders <[email protected]> Fri, 12 Aug 2016 15:00:07 -0400
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <[email protected]> |
> On Aug 11, 2016, at 1:44 AM, Shivani Palle <[email protected]> = wrote: >=20 > Hi, >=20 >=20 > I am facing one issue while using HTML::Parser. Please help me. >=20 > Issue: >=20 > I am using HTML::Parser to parse all the HTML files through out the = directories to get hard coded strings from the html files(text between = the tags). This does not directly answer your question, but you can solve the same = problem with HTML::Restrict (disclaimer: am author of said module): use HTML::Restrict; =20 my $hr =3D HTML::Restrict->new(); =20 # use default rules to start with (strip away all HTML) my $processed =3D $hr->process(' <b>i am bold</b> '); =20 # $processed now equals: 'i am bold' Hope this helps, Olaf