my $first = 'match'; my $second = 'matching\.com'; my $third = 'match\.company'; $data =~ /(?:$first|$second|$third)/gi)