         // The searched string.
         public var searched: String { return match.searched }
         
-        // The range in the searched string.
-        public var range: Range<String.Index>? {
-            return match.result.range(at: index).toRange(in: searched)
-        }
+        var nsRange: NSRange { return match.result.range(at: index) }
         
         init(index: Int, match: Match) {
             self.match = match

    }
}

// MARK: Match

/// A type that represents a match searched by regular expression.
public struct Match : MatchProtocol {
    
    /// Options for matching
    public struct Options : OptionSetAdapting {

    
    
    /// A type thats represents capture group in a match.
    public struct CaptureGroup : _NSRangeBasedMatch {
    
        // The index in the match.
        public let index: Int
        
