I'm trying to use a regex to match a passed value.  I'm trying to use an or
between the patterns, and it needs to be case insensitive.
I've tried it two ways, and it doesn't seem to work either way completely.

1st example:

if($ep =~ /^rglyc[12345] |^rglyd[235678] | ^rglyf3 | ^rglyg6 | ^rglyt5 |
^rglyu1/i)
    {
       $org="LYX";
    subscription($ep,$pr,$sub,$org,$plat);
    }
   elsif ($ep =~ /^rglyv[34567] | ^rglyw[79]/i )
    {
       $org="LYP";
    subscription($ep,$pr,$sub,$org,$plat);
    }

and:

if($ep =~ /^rglyc[12345]/i |/^rglyd[235678]/i | /^rglyf3/i | /^rglyg6/i |
/^rglyt5/i | /^rglyu1/i)
    {
       $org="WRALC.LYX";
    subscription($ep,$pr,$sub,$org,$plat);
    }
   elsif ($ep =~ /^rglyv[34567]/i | /^rglyw[79]/i )
    {
       $org="WRALC.LYP";
    subscription($ep,$pr,$sub,$org,$plat);
    }

Two questions:

1. How do I do an "or" in a regex if statement like this?
2. Is there a better(more efficient) way to do this? (I know that's a loaded
question to a perl list. <G>)

-Paul



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to