正则表达式函数错误
porridgec opened this issue · comments
正则表达式
一节,书中的代码是:
let matches = regex.matchesInString(input,
options: [],
range: NSMakeRange(0, input.utf16.count))
但是Swift 3中应为
let matches = regex.matches(in: input,
options: [],
range: NSMakeRange(0, input.utf16.count))
感谢指出,尽快修正!
哇喵神回复好快