 
     // MARK: - CustomStringConvertible
     func testRegexCustomStringConvertible() {
-        let regex: Regex = "foo"
-        XCTAssertEqual(regex.description, "Regex<\"foo\">")
+        let regex = try? Regex("foo")
+        XCTAssertEqual(regex?.description, "Regex<\"foo\">")
     }
 
     func testMatchCustomStringConvertible() {
-        let regex: Regex = "bar"
-        let match = regex.firstMatch(in: "bar")!
-        XCTAssertEqual(match.description, "Match<\"bar\">")
+        let regex = try? Regex("bar")
+        let match = regex?.firstMatch(in: "bar")!
+        XCTAssertEqual(match?.description, "Match<\"bar\">")
     }
 }

    }

    func testMatchStringApplyingTemplate() {
        let regex: Regex = "([1-9])(Needed)"
        let match = regex.firstMatch(in: "1Needed")
        XCTAssertEqual(match?.string(applyingTemplate: "Test$1ThatIs$2"), "Test1ThatIsNeeded")
    }



    // MARK: - Match
    func testMatchString() {
        let regex = try? Regex("[1-9]+")
        let firstMatchString = regex?.firstMatch(in: "abc5def")?.string
        XCTAssertEqual(firstMatchString, "5")
    }

    func testMatchRange() {
        let regex = try? Regex("[1-9]+")
        let firstMatchRange = regex?.firstMatch(in: "abc5def")?.range
        XCTAssertEqual(firstMatchRange?.lowerBound.encodedOffset, 3)
        XCTAssertEqual(firstMatchRange?.upperBound.encodedOffset, 4)
    }

    func testMatchCaptures() {
        let regex = try? Regex("([1-9])(Needed)(Optional)?")
        let match1 = regex?.firstMatch(in: "2Needed")
        let match2 = regex?.firstMatch(in: "5NeededOptional")

        enum CapturingError: Error { // swiftlint:disable:this nesting
            case indexTooHigh
