Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: change [A-Z] to U, [a-z] to L with one regex?

by ikegami (Pope)
on Mar 20, 2013 at 07:00 UTC ( #1024457=note: print w/ replies, xml ) Need Help??


in reply to Re: change [A-Z] to U, [a-z] to L with one regex?
in thread change [A-Z] to U, [a-z] to L with one regex?

Simpler solution not limited to non-ASCII chars:

s/(\p{Lu})|\p{Ll}/ defined($1) ? 'U' : 'L' /eg;


Comment on Re^2: change [A-Z] to U, [a-z] to L with one regex?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024457]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-11-26 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (176 votes), past polls