in reply to Blacklisting with a Regular Expression

yes, i think you definitely see if anything matches, and then negate that. So if it matches /evil|bad|wrong/ then it is a bad string that should be blacklisted. Now, that regex can be formed dynamically:
my $good = "this string contains no blacklisted tokens"; my $bad = "this string is evil and wrong"; my @blacklist = ('evil', 'bad', 'wrong'); my $re = join '|', @blacklist; warn 'good string is ok' if $good !~ /\b(?:$re)\b/i; warn 'bad string failed' if $bad =~ /\b(?:$re)\b/i;
Note that i took the liberty of using the /i modifier, and also added the word boundries. Also note that ?: is just so it doesn't needlessly capture.
Note also that look-aheads aren't needed here unless you care for some reason about the order of the blacklist hits, but it seems like you only care if they exist at all..