无标题文章

2017-03-03  本文已影响12人  青青青青

判断是否为正确的手机号码

NSString *patternTel = @"^1[0-9]{10}$";

NSRegularExpression *TelExp = [NSRegularExpression regularExpressionWithPattern:patternTel options:NSRegularExpressionCaseInsensitive error:&err];

NSTextCheckingResult * isMatchTel = [TelExp firstMatchInString:mobileTf.text options:0 range:NSMakeRange(0, [mobileTf.text length])];

上一篇 下一篇

猜你喜欢

热点阅读