0
我试图创建以下NSRegularExpression
(我试图找到所有逗号,
,左括号(
,右括号)
和反斜线\
):无法创建,因为“无法创建(元类型)逃脱NSRegularExpression”的NSRegularExpression
var error: NSError?
NSRegularExpression(pattern: "[,\\(\\)\\]", options: nil, error: &error)
但它与下面的错误返回.None
:
Couldn't create (Metatype) escape NSRegularExpression
而下面userInfo
:
NSInvalidValue: "[,\(\)\]"
这是什么意思?