TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regex for stripping FONT tags?



Hi all, 

We're making the arduous conversion from structured markup to CSS here at
work. To make my life a little easier, I'm trying to write a little one
liner Perl script to remove the <font></font> tags from an HTML
document. Unfortunately, my regex is a little too trigger happy and is
removing everything between the font tags as well! No good! (I thought
Perl used greedy regexs which got rid of this problem?)

Anyway, here's what I'm trying to use:

s/<\/*font.*>//i

By my reading, this should substitue anything that starts with "<font" or
"</font" and ends with ">" with nothing, insensitive of the case.

Any clues as to where I've gone wrong?

Thanks in advance,

Luke