Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024457]
help
Chatterbox?
[Tanktalus]: SwaJime: wouldn't status & status < 13 be true if status was 0?
[SwaJime]: I thought 0 was false, and false AND anything would be false ...
[SwaJime]: unless & is higher precedence than <
[SwaJime]: couldn't find bitwise in precedence list for sybase

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-08-22 18:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (338 votes). Check out past polls.

    Notices?