my $regexp = join '|', @patterns; $str =~ /$regexp/ #### $cleanLine =~ s/$_//g for @regexps;