Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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:>*

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://508276]
help
Chatterbox?
[Happy-the-monk]: Moin !

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2018-07-23 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (459 votes). Check out past polls.

    Notices?