<分区>
我正在尝试使用正则表达式获取 title 的值。这个正则表达式有什么问题。比赛即将到来。
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)) {
}