             return regularExpression.options
         }
         set {
-            regularExpression = try! NSRegularExpression(pattern: regularExpression.pattern, options: newValue)
+            self = try! Regex(pattern: self.pattern, options: newValue)
         }
     }
     
     
     /// The number of capture groups.
     public var numberOfCaptureGroups: Int { return regularExpression.numberOfCaptureGroups }
+    
+    private(set) internal lazy var namedCaptureGroupInfo: [String: Int] = {
+        return [:]
+    }()
     
 }
 

    
    /// Wrapped NSRegularExpression.
    public var regularExpression: NSRegularExpression
    
    /**
     Creates a `Regex` with unchecked string literal and options. Runtime error is raised if the unchecked pattern is invalid.

     - throws: An error if pattern is invalid.
     */
    public mutating func setPattern(_ pattern: String) throws {
        self = try Regex(pattern: pattern, options: self.options)
    }
    
    
