标签:
-(BOOL)regexTel
{
if ( self == nil || [self length] == 0 )
{
return NO;
}
NSString *regex = @"^((13[0-9])|(14[0-9])|(15[0-9])|(17[6-8])|(1705)|(1709)|(18[0-9]))\\d{8}$";
NSPredicate *pred = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
return [pred evaluateWithObject:self];
}
self:N SString
标签:
原文地址:http://www.cnblogs.com/PJXWang/p/5948152.html