[thelist] Perl Regex

Manish Sharma msharma at satyam.net.in
Tue Apr 3 23:25:15 CDT 2001


What's the best Perl Regex that matches HTML tags in a line?
Actually, I plan to remove HTML tags from a line and pick up text between
the tags.
Now,
s/<.+>//;
will not work!

If I use the above REGEX on the following line:
<TITLE>Test title</TITLE>
it matches the entire line! (Picks up the fist < and the last >)
I'm completely stumped.
Help!
Manish

Manish Sharma

Simply Graphix Pvt. Ltd.
http://www.simplygraphix.com - Extreme Design
http://www.fontmagic.com - Largest True Type Fonts Directory on the Internet







More information about the thelist mailing list