my $regexp = Regexp::Assemble->new( flags => 'i', track => 1 )->add(@patterns); if( $regexp->match($string) ) { print "$string was matched by pattern ", $regexp->matched, "\n"; }