http://www.perlmonks.org?node_id=881013


in reply to Regex to match multiple words in an email subject

#!/usr/bin/perl use warnings; use strict; for (<DATA>) { print /(?:SSL|SSL Certificate|VASCO)/ ? "Match\n" : "No match\n"; } __DATA__ SSL SSL Certificate VASCO something else

Output:

Match
Match
Match
No match