Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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.


Comment on Re^4: regex testing for multiple values
Select or Download Code

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 lurking in the Monastery: (19)
As of 2015-07-07 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls