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

Re: Parsing HTML tags with regex

by BUU (Prior)
on Nov 11, 2005 at 08:32 UTC ( [id://507665]=note: print w/replies, xml ) Need Help??


in reply to Parsing HTML tags with regex

It's not really possible with a real regex. HTML is an arbitrarily nested grammar, which doesn't work very well with a "regular" expression. However, given than perl's regexen are of the scary, non regular kind, you could probably manage to do it. Like so..
/(.*)(?{HTML::TokeParser->new( $1 )}/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found