This commit is contained in:
Nabil Chatbi 2016-12-27 20:39:15 +01:00
parent a449b4b8af
commit ec1064e158
1 changed files with 1 additions and 1 deletions

View File

@ -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)