Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: Parsing HTML tags with regex

by Perl Mouse (Chaplain)
on Nov 14, 2005 at 11:22 UTC ( [id://508276]=note: print w/replies, xml ) Need Help??


in reply to Re: Parsing HTML tags with regex
in thread Parsing HTML tags with regex

But that would match on:
a < b implies b > a
which does not contain an HTML tag. Oh, and it won't match all HTML tags correctly either. Consider for instance:
<tag attr1="one" attr2="two"> <tag attr='"'> <tag attr1='"'>
The first one fails to match because your regex requires that if there are double quoted values inside a tag, they must follow each other. And the second fails because your regex doesn't consider single quoted values.
Perl --((8:>*

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-03-28 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found