匹配文章id使用原生跳转
1 | var str = "http://bbs.pcauto.com.cn/topic-15113553.html"; |
OC实现
1 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"pcauto.com.cn/topic-(\\d*).html" options:NSRegularExpressionCaseInsensitive error:nil]; |
匹配文章id使用原生跳转
1 | var str = "http://bbs.pcauto.com.cn/topic-15113553.html"; |
OC实现
1 | NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"pcauto.com.cn/topic-(\\d*).html" options:NSRegularExpressionCaseInsensitive error:nil]; |