         guard let match = regex.match(string, options: [])
             else { XCTFail("Could not find match"); return }
         
-        let stringRange = NSRange(Range(match.range))
+        let stringRange = NSRange(match.range)
         
-        #if os(Linux)
-            let matchString = NSString(string: string).substringWithRange(stringRange)
-        #else
-            let matchString = NSString(string: string).substring(with: stringRange)
-        #endif
+        let matchString = NSString(string: string).substring(with: stringRange)
         
         XCTAssert(matchString == "Welcome")
     }

            guard let match = regex.match(string, options: [])
                else { XCTFail("Could not find match"); return }
            
            let stringRange = NSRange(Range(match.range))
            
            #if os(Linux)
                let matchString = NSString(string: string).substringWithRange(stringRange)
            #else
                let matchString = NSString(string: string).substring(with: stringRange)
            #endif
            
            XCTAssert(matchString == "Bird", matchString)
        }

        }
    }
}

#if os(Linux)

extension NSRange {
    
    init(_ range: Range<Int>) {
        
        self = NSRange(CountableRange(range))
    }
}

#endif
