//数字
NSString *regex =@"[0-9]*";
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex];
BOOL numregex = [pred evaluateWithObject:searchBar.text];
//字母
NSString *letterregex =@"[a-zA-Z]*";
NSPredicate *letterpred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",letterregex];
BOOL leeter = [letterpred evaluateWithObject:searchBar.text];
//汉字
NSString *chinese = @"[\u4e00-\u9fa5]+";
NSPredicate *chinseepred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",chinese];
BOOL chinesePress =[chinseepred evaluateWithObject:searchBar.text];
NSString *regex =@"[0-9]*";
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex];
BOOL numregex = [pred evaluateWithObject:searchBar.text];
//字母
NSString *letterregex =@"[a-zA-Z]*";
NSPredicate *letterpred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",letterregex];
BOOL leeter = [letterpred evaluateWithObject:searchBar.text];
//汉字
NSString *chinese = @"[\u4e00-\u9fa5]+";
NSPredicate *chinseepred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",chinese];
BOOL chinesePress =[chinseepred evaluateWithObject:searchBar.text];
NSString *regex =@"[a-zA-Z0-9]*";
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regex];
BOOL leeterAndnum = [pred evaluateWithObject:inputString];