         self = try Regex(pattern: pattern, options: self.options)
     }
     
+    private var _options: Options
     
     /// The options value.
     public var options: Options {
         get {
-            return regularExpression.options
+            return _options
         }
         set {
             self = try! Regex(pattern: self.pattern, options: newValue)

    
    public init(regularExpression: NSRegularExpression) {
        self.regularExpression = regularExpression
        self.namedCaptureGroupInfo = [:]
    }
    

     - throws: An error if failed.
     */
    public init(pattern: String, options: Options = []) throws {
        let re = try NSRegularExpression(pattern: pattern, options: options.toNSRegularExpresstionOptions())
        self.regularExpression = re
        self._options = options
//        self.namedCaptureGroupInfo = extractNamedCaptureGroups(in: pattern, expectedGroupsCount: re.numberOfCaptureGroups)
        self.namedCaptureGroupInfo = [:]
    }
