正则表达式
来源:互联网 发布:js观察者模式.阮一峰 编辑:程序博客网 时间:2024/06/05 21:01
// NSString * MOBILE = @"^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$";
// NSString * CM = @"^1(34[0-8]|(3[5-9]|5[017-9]|8[278])\\d)\\d{7}$";
// NSString * CU = @"^1(3[0-2]|5[256]|8[56])\\d{8}$";
// NSString * CT = @"^1((33|53|8[09])[0-9]|349)\\d{7}$";
// NSString * PHS = @"^0(10|2[0-5789]|\\d{3})\\d{7,8}$";
手机号码:
13[0-9], 14[5,7], 15[0, 1, 2, 3, 5, 6, 7, 8, 9], 17[6, 7, 8], 18[0-9], 170[0-9]
移动: 134,135,136,137,138,139,150,151,152,157,158,159,182,183,184,187,188,147,178,1705
联通: 130,131,132,155,156,185,186,145,176,1709
电信: 133,153,180,181,189,177,1700
//NSString *MOBILE = @"^1(3[0-9]|4[57]|5[0-35-9]|8[0-9]|70)\\d{8}$";
移动 134,135,136,137,138,139,150,151,152,157,158,159,182,183,184,187,188,147,178,1705
//NSString *CM = @"(^1(3[4-9]|4[7]|5[0-27-9]|7[8]|8[2-478])\\d{8}$)|(^1705\\d{7}$)";
联通: 130,131,132,155,156,185,186,145,176,1709
//NSString *CU = @"(^1(3[0-2]|4[5]|5[56]|7[6]|8[56])\\d{8}$)|(^1709\\d{7}$)";
电信: 133,153,180,181,189,177,1700
//NSString *CT = @"(^1(33|53|77|8[019])\\d{8}$)|(^1700\\d{7}$)";
//NSString * PHS = @"^0(10|2[0-5789]|\\d{3})\\d{7,8}$";
//NSPredicate *regextestmobile = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", MOBILE];
//NSPredicate *regextestcm = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CM];
//NSPredicate *regextestcu = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CU];
//NSPredicate *regextestct = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", CT];
//NSPredicate *regextestphs = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", PHS];
// return [regextestmobile evaluateWithObject:candidate] ||
// [regextestphs evaluateWithObject:candidate] ||
// [regextestct evaluateWithObject:candidate] ||
// [regextestcu evaluateWithObject:candidate] ||
// [regextestcm evaluateWithObject:candidate];
无敌状态
NSString *MOBILE_All = @"^1\\d{10}$";
- 【正则表达式】正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 正则表达式
- 栈 和 队列
- Music Player Daemon
- Appium实现的技巧
- 连续分配方式 -- 可重定位分区分配
- Purity、NMI、RI、Precision、Recall、F值,聚类指标的计算JAVA实现。
- 正则表达式
- 聊聊深度学习这档子事(3):寻找万能的通用模型
- Enhanced Admin Product Grid
- EL和JSTL表达式语言
- 文章标题
- Retrofit2源码解读
- time
- 异常点/离群点检测算法——LOF
- 第十五周上机实践项目2:洗牌