/** * 正则表达式匹配中文 */ - (BOOL)isRegexMatching:(NSString *)str; { NSString *regex = @"^[u4E00-u9FFF]+$"; return [[NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex] evaluateWithObject:str]; }
/** * 正则表达式匹配中文 */ - (BOOL)isRegexMatching:(NSString *)str; { NSString *regex = @"^[u4E00-u9FFF]+$"; return [[NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex] evaluateWithObject:str]; }