Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Converting HTML tags into uppercase using Perl

by Corion (Patriarch)
on Nov 29, 2005 at 11:09 UTC ( [id://512580]=note: print w/replies, xml ) Need Help??


in reply to Re: Converting HTML tags into uppercase using Perl
in thread Converting HTML tags into uppercase using Perl

This script of course breaks for the case of an embedded ">" sign in the value, and it uppercases all values too, both of which will break the HTML file:

<html> <img src="a_greater_b.gif" alt="a > b" /> <img src="a_smaller_b.gif" alt="a < b"/> </html>

These niggles are the reason why it is always recommended to avoid parsing HTML with regular expressions.

Update: Rearranged HTML to be a test case for the second problem as well.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-23 10:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found