正则是这个:https?://\S*?/groupVerify\?code=
用谓词想匹配字符串:http://127.0.0.1:8081/groupVerify?code=5f3589d3bdcc41d5a9664c51a7c4d024&channel=2
返回NO, 但是用NSRegularExpress就可以匹配成功一个结果,求大神帮看看怎么回事?
以下是代码, 原谅我格式不怎么好看
[[NSPredicate predicateWithFormat:@"SELF MATCHES %@", @"https?://\\S*?/groupVerify\\?code="] evaluateWithObject:@"http://127.0.0.1:8081/groupVerify?code=5f3589d3bdcc41d5a9664c51a7c4d024&channel=2"]