Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: Parsing HTML tags with regex

by Perl Mouse (Chaplain)
on Nov 14, 2005 at 11:22 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2016-10-24 21:28 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (310 votes). Check out past polls.