Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: regex testing for multiple values

by nefigah (Monk)
on Mar 10, 2008 at 19:18 UTC ( #673321=note: print w/replies, xml ) Need Help??


in reply to Re^3: regex testing for multiple values
in thread regex testing for multiple values

Update: Oh, did you want there to be a literal curly brace before IND but not the rest? If so, ignore the rest of this post.

Yeah, you have a mismatched bracket there :) Try:
if ($Session->{'usrSystem'} =~ /IND|NOR|PRO|ARM|SND/s)

Note that you'll want to surround the alternations in parentheses (these kind) if you want something like:
/^(IND|NOR|PRO|ARM|SND)/


I'm a peripheral visionary... I can see into the future, but just way off to the side.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://673321]
help
Chatterbox?
[choroba]: Yeah, let's ban dot in INC, but add glob to it!
[Corion]: choroba: Well, at least the above is user-defined, not implicitly by Perl ;)
LanX globalization is evil! Lets Perlxit!
[stevieb]: "Yeah, let's ban dot in INC, but add glob to it!" LOL!!!

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2017-01-19 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.