【发布时间】:2017-05-19 05:37:42
【问题描述】:
我正在尝试使用正则表达式获取标题的值。这个正则表达式有什么问题。比赛即将结束。
let strToCheck = "<title>youtube \n </title>"
let rgx = "<title(.*?)>(.*?)</title>"
let rx = try NSRegularExpression(pattern: rgx, options: [.caseInsensitive])
if let match = rx.firstMatch(in: strToCheck, options: [], range:
NSMakeRange(0, string.characters.count)) {
}
【问题讨论】: