|
5/24 |
2003/7/10-11 [Computer/SW/Languages/Perl] UID:28994 Activity:nil |
7/9 Perl question: s#<(/?[A-Z]+)>#<lc(\1)>#ge I'm trying to lowercase my HTML tags. that would work if I could get perl to execute my lc... the e flag doesn't work because I don't want to evaluate the "<>" in the second half of my regex. However, it does work when I do something stupid like: s#<(/?[A-Z]+)>#$f="<";$f.=lc($1);$f.=">"#ge \_ I believe s/<(\/?[A-Z]+)>/<\L$1\E>/g would work. -niloc \_ Thanks, I adjusted it to: s#<(.*)?>#<\L$1\E>#g to work for things like <A HREF="yomama"> |