s!(<|</)([^\!][A-Z0-9 ]+>)!$1\L$2\E!g;
or
s/(<|<\/)([^!][A-Z0-9 ]+>)/$1\L$2\E/g;

The RE above captures and replaces all HTML tags with lowercase as 
desired except for any tag that has only one letter such as <P>, 
<B> or <I>

It will get the </B>, </P> and </I>

It properly ignores the <!DOCTYPE> tag

What is the correct way to write the above RE?

-- 
Silverfox
Please don't CC me. I am subscribed to the list.
Do you want someone to do it for you?
They will be glad to, if you pay them.
To get free help one must show evidence
that one has made an honest effort to
find/figure out the answer first.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to