Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Regular expression question

by clueless newbie (Deacon)
on Sep 27, 2019 at 00:12 UTC ( #11106776=note: print w/replies, xml ) Need Help??


in reply to Regular expression question

Have you looked at the Marpa::R2::HTML parser?
use 5.014; use warnings; use <a href="">Marpa::R2::HTML qw(html); my $with_table = <<"HTML"; <!DOCTYPE html> <html> <body> <svg width="100" height="100"> <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill= +"yellow" /> </svg> </body> </html> HTML my $no_table = html( \$with_table, { svg => sub { return q{} } }); say $$no_table;
yields
<!DOCTYPE html> <html> <body> </body> </html>
It's pretty tolerant --- if we drop the closing </svg> tag ... well, it will return the same answer.

Log In?
Username:
Password:

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

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



    Results (80 votes). Check out past polls.

    Notices?