pattern
This commit is contained in:
parent
a449b4b8af
commit
ec1064e158
|
@ -34,7 +34,7 @@ public struct Pattern {
|
|||
func matcher(in text: String) -> Matcher {
|
||||
do {
|
||||
let regex = try NCRegularExpression(pattern: self.pattern, options:[])
|
||||
let nsString = text as NSString
|
||||
let nsString = NSString(text)
|
||||
let results = regex.matches(in: text, range: NSRange(location: 0, length: nsString.length))
|
||||
|
||||
return Matcher(results,text)
|
||||
|
|
Loading…
Reference in New Issue