Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 NSRegularExpression 执行变音符号不敏感匹配?regularExpressionWithPattern 的选项似乎没有提供这一点。
您可以删除变音符号并处理已清理的字符串,例如:
tmpString = [[[NSString alloc] initWithData:[realString dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES] encoding:NSASCIIStringEncoding] autorelease];