in reply to Re: Quick regexp question
in thread Quick regexp question

If you're going to better him on his code, you might just as well do it the proper way. Eh... the shorter way. :)
$a =~ s#([A-Z]{4,})#\u\L$1#g;

Replies are listed 'Best First'.
Re: Re: Re: Quick regexp question
by liz (Monsignor) on Oct 05, 2003 at 16:00 UTC
    To be honest, I didn't know you could chain \u\L that way.

    Another "nice idiom learned at the Monastery" for me today!

    Thanks, bart!

    Liz