NSString的正则匹配
by 伍雪颖
+(BOOL)isOnlyLetters:(NSString *)str {
NSString *lettersRegex = @"[A-Za-z]";
NSPredicate *letters = [NSPredicate predicateWithFormat:@H_404_40@@"SELF MATCHES %@",lettersRegex];
return [letters evaluateWithObject:str];
NSString *lettersRegex = @"[A-Za-z]";
NSPredicate *letters = [NSPredicate predicateWithFormat:@H_404_40@@"SELF MATCHES %@",lettersRegex];
return [letters evaluateWithObject:str];
}