Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Do you know where your variables are?
 
PerlMonks  

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:>*


Comment on Re^2: Parsing HTML tags with regex
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-04-17 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (439 votes), past polls