if ($mail_id =~ /\A(box1|box2|box3|other1|other2)*\.(yourcompany|other +company|elsewhere)\.com\z/ ) { print "matched\n"; }
If you want to ensure that non-existant combinations don't occur, then:
if ($mail_id =~ /\A(box1\.yourcompany\.com|box2\.yourcompany\.com|box3 +\.yourcompany\.com|other1\.othercompany\.com|other2\.elsewhere\.com)\ +z/ ) { print "matched\n"; }
In reply to Re^3: About validating mail id
by keszler
in thread About validating mail id
by pavanmach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |