This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Might be this will helpful to remove error: | |
func isMatch(regex: String, options: NSRegularExpressionOptions) -> Bool | |
{ | |
var error: NSError? | |
var exp = NSRegularExpression(pattern: regex, options: options, error: &error) | |
if let error = error { | |
println(error.description) | |
} | |
var matchCount = exp?.numberOfMatchesInString(self, options: nil, range: NSMakeRange(0, self.length)) |