$text = "The dog is black cat is white and the fox does not like the cow or pig"; if ($text =~ /(dog|cow|pig)/) { print "match found" }