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

Did you try it out?

Did you? :)

$_ = '{IND'; print "Ok\n" if /{IND/; ____ Ok

Update: It seems that I misquoted ww, who actually wrote 'Did you try taking it out?'. My point remains valid, though. The problem is not with the regex, it is somewhere else in the code.

Replies are listed 'Best First'.
Re^6: regex testing for multiple values
by ww (Archbishop) on Mar 10, 2008 at 20:32 UTC

    With chagrin, I must admit that I was thinking syntax, and testing proves me wrong on that account.

    However, grashoper is not looking for '{IND' but, rather, for "3 letter account codes...."

    If I understand that correctly, the condition in the regex in Re^2: regex testing for multiple values

    if ($Session->{'usrSystem'}=~/{IND|NOR|PRO|ARM|SND/s)

    introduces an open_curly_brace ({), which is wrong, in part, because the regex then tries first to match on for an open_curly_brace.