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

Re^3: Making a regex case insensitive

by eric256 (Parson)
on Mar 07, 2007 at 16:24 UTC ( #603630=note: print w/replies, xml ) Need Help??


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

Regardless of how you think you could at least test stuff.

for (0..255) { print "$_=" . chr($_) . "\n" if chr($_) =~ /;/i };

That should print 59=; out showing that /;/i is only matching ; and not lowercase ;, whatever that would be.

print uc(';'), lc(';'); #outputs ;;

FYI I like to use perl -dex (as recommended by tye I think) which gives you a nice way to run perl code and see its results.


___________
Eric Hodges

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://603630]
help
Chatterbox?
erix wouldn't mind a nice old windmill to live in... Mueller/Miller/ Molenaar
LanX likes Swedish clogs

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-12-15 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (439 votes). Check out past polls.

    Notices?