I think what all these responses are trying to say is that you want something like:
if ($session->{'usrSystem'} =~ m/(?:(?:SND|ARM|PRO|NOR|IND|) )*/sThe (?: ) just tell the parser to not capture the matched strings (i.e., not to produce the $1.. variables).
I presumed from your version of the Regex that you wanted to match 0 or more occurances of the 3 letter account codes (which was why you put the * in it).
I also presume you meant to have a white-space character (or more specifically a blank) since you put a space between the \ and the "...is that right?
I also presume that you put the /s at the end to treat the string a single line and that . will match embedded newline characters. Is that correct?
In reply to Re: regex testing for multiple values
by ack
in thread regex testing for multiple values
by grashoper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |