 
 
 extension String {
+    var range: NSRange {
+        return NSMakeRange(0, self.utf16Count)
+    }
+    
     func substringWithRange(range: NSRange) -> String {
         let rangeStart : String.Index = advance(self.startIndex, range.location)
         return self.substringWithRange(rangeStart..<advance(rangeStart, range.length))

    }
    
    func groupsOfFirstMatch(string: String, options: NSMatchingOptions = nil) -> [String] {
        var match = self.matcher.firstMatchInString(string, options: options, range: NSMakeRange(0, string.utf16Count))
        var groups : [String] = []
        if let match = match {
            for i in 0..<match.numberOfRanges {

    }
    
    func match(string: String, options: NSMatchingOptions = nil) -> Bool {
        return self.matcher.numberOfMatchesInString(string, options: options, range: string.range) != 0
    }
    
    func matchingsOf(string: String, options: NSMatchingOptions = nil) -> [String] {
        var matches : [String] = []
        self.matcher.enumerateMatchesInString(string, options: options, range: string.range) {
            (result: NSTextCheckingResult!, flags: NSMatchingFlags, stop: UnsafeMutablePointer<ObjCBool>) in
            matches.append(string.substringWithRange(result.range))
        }
