This commit is contained in:
Nabil Chatbi 2016-12-27 20:08:19 +01:00
parent 93f8f80cbf
commit a449b4b8af
1 changed files with 2 additions and 2 deletions

View File

@ -28,12 +28,12 @@ public struct Pattern {
func validate()throws
{
_ = try NCRegularExpression(pattern: self.pattern)
_ = try NCRegularExpression(pattern: self.pattern, options:[])
}
func matcher(in text: String) -> Matcher {
do {
let regex = try NCRegularExpression(pattern: self.pattern)
let regex = try NCRegularExpression(pattern: self.pattern, options:[])
let nsString = text as NSString
let results = regex.matches(in: text, range: NSRange(location: 0, length: nsString.length))