「and」と「the」という単語を正規表現検索から除外するために次のことを試しましたが、機能していないようです。私が間違っていることは何か分かりますか?
NSString *pattern = [NSString stringWithFormat:@"\\b%@\\b\\b(?!.*\\b(?:and|the)\\b)", word];
NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:pattern options: NSRegularExpressionCaseInsensitive error:nil];