Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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?
LanX leaves with a song of the Chjuman League
[ambrus]: LanX: that's funny because it's actually the upper class that sleep in hotels, so they're the ones who should know how it's pronounced
[LanX]: h is mute in French (and most other romanic languages)
[LanX]: https://en. oxforddictionaries .com/explore/words -with-silent-h
[LanX]: it's 'orrible zis langage...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2017-03-27 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (321 votes). Check out past polls.