// 是否是网络连接url
- (BOOL)isInternetLink:(NSString *)linkOrPath
{
NSString * regexStr =@"http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?";
if (!linkOrPath) {
return NO;
}
NSPredicate *strPredicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regexStr];
return [strPredicate evaluateWithObject:linkOrPath];
}
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
9578471884