my $pattern = '\b(?:' . join('|', @tokens) . ')\b';