Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by chromatic (Archbishop)
on Apr 03, 2000 at 07:27 UTC ( #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> ? - Answer 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?
[Discipulus]: the fun is the mother used to say ' two left hand' to describe people unabel to manual work..

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2018-02-19 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (264 votes). Check out past polls.

    Notices?