Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Regular expression question

by choroba (Bishop)
on Sep 26, 2019 at 11:09 UTC ( #11106743=note: print w/replies, xml ) Need Help??


in reply to Regular expression question

Regular expressions can't parse HTML reliably. It's safer to parse the HTML with a proper parser and remove the element there. For example, in XML::XSH2, you can do
open :r :F html file.html ; delete //svg ; save :F html :b ;
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2019-11-21 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (107 votes). Check out past polls.

    Notices?