改变 UILable中指定文字的颜色
NSMutableAttributedString *attributedString =[[NSMutableAttributedString alloc] initWithAttributedString:_lable.attributedText];
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor grayColor] range:NSMakeRange(3, 3)];
[_lable setAttributedText:attributedString];
使用正则表达式匹配双字节字符
NSString * regex = @"[^x00-xff]";
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
char c = @"好";
BOOL isMatch = [pred evaluateWithObject:[NSString stringWithFormat:@"%c",c]];