Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Making a regex case insensitive

by ikegami (Patriarch)
on Mar 06, 2007 at 18:45 UTC ( [id://603487]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Making a regex case insensitive
in thread Making a regex case insensitive

Nothing is modified, not even letters. Case is preserved.
>perl -le "'aA' =~ /(.*)/i && print $1 aA

Only the matching is affected. /i causes lower- and upper-case letters to match lower- and upper-case versions of itself.

Maybe you were thinking of

>perl -le "lc('aA') =~ /(.*)/ && print $1 aa

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-25 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found