美文网首页
正则姓名包括少数民族的验证

正则姓名包括少数民族的验证

作者: 行走在北方 | 来源:发表于2020-12-01 18:12 被阅读0次
NSString *match = @"^[\u4e00-\u9fa5.·\\u36c3\u4DAE]{2,}$";

    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF matches %@", match];
    return [predicate evaluateWithObject:name];

相关文章

网友评论

      本文标题:正则姓名包括少数民族的验证

      本文链接:https://www.haomeiwen.com/subject/imnswktx.html