Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Answer: How can I strip away some nested markup code in html by perl, like <SCRIPT> ?

( #6699=categorized answer: print w/ replies, xml ) Need Help??

Q&A > regular expressions > How can use Perl to strip away some nested HTML markup code, like <SCRIPT> ? contributed by chromatic

Unless you're dealing with very simple HTML (either generated by a program or by a beginner), you might discover that these approaches have limited degrees of success. ender's is the best, as it is least greedy.

For all non-trivial HTML parsing, look to CPAN modules: HTML::Parser and HTML::TokeParser.

  • Comment on Answer: How can I strip away some nested markup code in html by perl, like <SCRIPT> ?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2016-06-27 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (337 votes). Check out past polls.