Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2016-07-26 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (234 votes). Check out past polls.