Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Removing text between HTML tags

by choroba (Archbishop)
on Sep 15, 2014 at 09:57 UTC ( #1100577=note: print w/replies, xml ) Need Help??


in reply to Removing text between HTML tags

Use a proper HTML handling tool. XML::LibXML can handle HTML if it follows the standard decently. I usually use its wrapper XML::XSH2, in which you can extract the text simply as
open :F html input.html ; for //p echo .//text() ;
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1100577]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2021-01-25 18:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?