0
我試圖創建以下NSRegularExpression
(我試圖找到所有逗號,
,左括號(
,右括號)
和反斜線\
):無法創建,因爲「無法創建(元類型)逃脫NSRegularExpression」的NSRegularExpression
var error: NSError?
NSRegularExpression(pattern: "[,\\(\\)\\]", options: nil, error: &error)
但它與下面的錯誤返回.None
:
Couldn't create (Metatype) escape NSRegularExpression
而下面userInfo
:
NSInvalidValue: "[,\(\)\]"
這是什麼意思?