if ($key =~ /not/) { return $string !~ /$rx/; } else { return $string =~ /$rx/; }