Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Parsing HTML tags with regex

by BUU (Prior)
on Nov 11, 2005 at 08:32 UTC ( #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 )}/

Comment on Re: Parsing HTML tags with regex
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2015-11-28 06:50 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (739 votes), past polls