"; NSString *str =[sentence removeAllNotChnAndNum]; //NSString *str = [sentence regexChnAndNum]; NSLog(@"%@",str); NSString *string =@"!@!#你好#¥%……&*()—- 我要的看片名我不懂的 # !¥%……&*()—- 啊及许久的大门###!¥%……&*()—- "; NSString *regexStr = @"[^\u4e00-\u9fa5]"; NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",regexStr]; NSLog(@"没有中文--------%@",[pred evaluateWithObject:string]?@"yes":@"no");}- (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated.}@end
免責聲明:若本站收錄的資源侵犯了您的權益,我們會及時刪除侵權內容,謝謝合作!