packages feed

pcre-light-0.1: tests/testdata/regex4.tests

testRegex "-- Do not use the \\x{} construct except with patterns that have the --" []
    ["/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/",
     "/-- that option is set. However, the latest Perls recognize them always. --/"]
    [Just ["/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/"],
     Nothing,
     Just ["/-- that option is set. However, the latest Perls recognize them always. --/"],
     Nothing]
,
testRegex "a.b" [ERROR]
    ["acb",
     "a\\x7fb",
     "a\\x{100}b ",
     "*** Failers",
     "a\\nb  "]
    [Just [" 0: acb"],
     Just [" 0: a\\x{7f}b"],
     Just [" 0: a\\x{100}b"],
     Nothing,
     Nothing]
,
testRegex "a(.{3})b" [ERROR]
    ["a\\x{4000}xyb ",
     "a\\x{4000}\\x7fyb ",
     "a\\x{4000}\\x{100}yb ",
     "*** Failers",
     "a\\x{4000}b ",
     "ac\\ncb "]
    [Just [" 0: a\\x{4000}xyb"],
     Just [" 1: \\x{4000}xy"],
     Just [" 0: a\\x{4000}\\x{7f}yb"],
     Just [" 1: \\x{4000}\\x{7f}y"],
     Just [" 0: a\\x{4000}\\x{100}yb"],
     Just [" 1: \\x{4000}\\x{100}y"],
     Nothing,
     Nothing,
     Nothing]
,
testRegex "a(.*?)(.)" []
    ["a\\xc0\\x88b"]
    [Just [" 0: a\\xc0"],
     Just [" 1: "],
     Just [" 2: \\xc0"]]
,
testRegex "a(.*?)(.)" [ERROR]
    ["a\\x{100}b"]
    [Just [" 0: a\\x{100}"],
     Just [" 1: "],
     Just [" 2: \\x{100}"]]
,
testRegex "a(.*)(.)" []
    ["a\\xc0\\x88b"]
    [Just [" 0: a\\xc0\\x88b"],
     Just [" 1: \\xc0\\x88"],
     Just [" 2: b"]]
,
testRegex "a(.*)(.)" [ERROR]
    ["a\\x{100}b"]
    [Just [" 0: a\\x{100}b"],
     Just [" 1: \\x{100}"],
     Just [" 2: b"]]
,
testRegex "a(.)(.)" []
    ["a\\xc0\\x92bcd"]
    [Just [" 0: a\\xc0\\x92"],
     Just [" 1: \\xc0"],
     Just [" 2: \\x92"]]
,
testRegex "a(.)(.)" [ERROR]
    ["a\\x{240}bcd"]
    [Just [" 0: a\\x{240}b"],
     Just [" 1: \\x{240}"],
     Just [" 2: b"]]
,
testRegex "a(.?)(.)" []
    ["a\\xc0\\x92bcd"]
    [Just [" 0: a\\xc0\\x92"],
     Just [" 1: \\xc0"],
     Just [" 2: \\x92"]]
,
testRegex "a(.?)(.)" [ERROR]
    ["a\\x{240}bcd"]
    [Just [" 0: a\\x{240}b"],
     Just [" 1: \\x{240}"],
     Just [" 2: b"]]
,
testRegex "a(.??)(.)" []
    ["a\\xc0\\x92bcd"]
    [Just [" 0: a\\xc0"],
     Just [" 1: "],
     Just [" 2: \\xc0"]]
,
testRegex "a(.??)(.)" [ERROR]
    ["a\\x{240}bcd"]
    [Just [" 0: a\\x{240}"],
     Just [" 1: "],
     Just [" 2: \\x{240}"]]
,
testRegex "a(.{3})b" [ERROR]
    ["a\\x{1234}xyb ",
     "a\\x{1234}\\x{4321}yb ",
     "a\\x{1234}\\x{4321}\\x{3412}b ",
     "*** Failers",
     "a\\x{1234}b ",
     "ac\\ncb "]
    [Just [" 0: a\\x{1234}xyb"],
     Just [" 1: \\x{1234}xy"],
     Just [" 0: a\\x{1234}\\x{4321}yb"],
     Just [" 1: \\x{1234}\\x{4321}y"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}"],
     Nothing,
     Nothing,
     Nothing]
,
testRegex "a(.{3,})b" [ERROR]
    ["a\\x{1234}xyb ",
     "a\\x{1234}\\x{4321}yb ",
     "a\\x{1234}\\x{4321}\\x{3412}b ",
     "axxxxbcdefghijb ",
     "a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b ",
     "*** Failers",
     "a\\x{1234}b "]
    [Just [" 0: a\\x{1234}xyb"],
     Just [" 1: \\x{1234}xy"],
     Just [" 0: a\\x{1234}\\x{4321}yb"],
     Just [" 1: \\x{1234}\\x{4321}y"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}"],
     Just [" 0: axxxxbcdefghijb"],
     Just [" 1: xxxxbcdefghij"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}\\x{3421}"],
     Nothing,
     Nothing]
,
testRegex "a(.{3,}?)b" [ERROR]
    ["a\\x{1234}xyb ",
     "a\\x{1234}\\x{4321}yb ",
     "a\\x{1234}\\x{4321}\\x{3412}b ",
     "axxxxbcdefghijb ",
     "a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b ",
     "*** Failers",
     "a\\x{1234}b "]
    [Just [" 0: a\\x{1234}xyb"],
     Just [" 1: \\x{1234}xy"],
     Just [" 0: a\\x{1234}\\x{4321}yb"],
     Just [" 1: \\x{1234}\\x{4321}y"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}"],
     Just [" 0: axxxxb"],
     Just [" 1: xxxx"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}\\x{3421}"],
     Nothing,
     Nothing]
,
testRegex "a(.{3,5})b" [ERROR]
    ["a\\x{1234}xyb ",
     "a\\x{1234}\\x{4321}yb ",
     "a\\x{1234}\\x{4321}\\x{3412}b ",
     "axxxxbcdefghijb ",
     "a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b ",
     "axbxxbcdefghijb ",
     "axxxxxbcdefghijb ",
     "*** Failers",
     "a\\x{1234}b ",
     "axxxxxxbcdefghijb "]
    [Just [" 0: a\\x{1234}xyb"],
     Just [" 1: \\x{1234}xy"],
     Just [" 0: a\\x{1234}\\x{4321}yb"],
     Just [" 1: \\x{1234}\\x{4321}y"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}"],
     Just [" 0: axxxxb"],
     Just [" 1: xxxx"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}\\x{3421}"],
     Just [" 0: axbxxb"],
     Just [" 1: xbxx"],
     Just [" 0: axxxxxb"],
     Just [" 1: xxxxx"],
     Nothing,
     Nothing,
     Nothing]
,
testRegex "a(.{3,5}?)b" [ERROR]
    ["a\\x{1234}xyb ",
     "a\\x{1234}\\x{4321}yb ",
     "a\\x{1234}\\x{4321}\\x{3412}b ",
     "axxxxbcdefghijb ",
     "a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b ",
     "axbxxbcdefghijb ",
     "axxxxxbcdefghijb ",
     "*** Failers",
     "a\\x{1234}b ",
     "axxxxxxbcdefghijb "]
    [Just [" 0: a\\x{1234}xyb"],
     Just [" 1: \\x{1234}xy"],
     Just [" 0: a\\x{1234}\\x{4321}yb"],
     Just [" 1: \\x{1234}\\x{4321}y"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}"],
     Just [" 0: axxxxb"],
     Just [" 1: xxxx"],
     Just [" 0: a\\x{1234}\\x{4321}\\x{3412}\\x{3421}b"],
     Just [" 1: \\x{1234}\\x{4321}\\x{3412}\\x{3421}"],
     Just [" 0: axbxxb"],
     Just [" 1: xbxx"],
     Just [" 0: axxxxxb"],
     Just [" 1: xxxxx"],
     Nothing,
     Nothing,
     Nothing]
,
testRegex "^[a\\x{c0}]" [ERROR]
    ["*** Failers",
     "\\x{100}"]
    [Nothing,
     Nothing]
,
testRegex "(?<=aXb)cd" [ERROR]
    ["aXbcd"]
    [Just [" 0: cd"]]
,
testRegex "(?<=a\\x{100}b)cd" [ERROR]
    ["a\\x{100}bcd"]
    [Just [" 0: cd"]]
,
testRegex "(?<=a\\x{100000}b)cd" [ERROR]
    ["a\\x{100000}bcd",
     "",
     "/(?:\\x{100}){3}b/8",
     "\\x{100}\\x{100}\\x{100}b",
     "*** Failers ",
     "\\x{100}\\x{100}b"]
    [Just [" 0: cd"],
     Just ["/(?:\\x{100}){3}b/8"],
     Just [" 0: \\x{100}\\x{100}\\x{100}b"],
     Nothing,
     Nothing]
,
testRegex "\\x{ab}" [ERROR]
    ["\\x{ab} ",
     "\\xc2\\xab",
     "*** Failers ",
     "\\x00{ab}"]
    [Just [" 0: \\x{ab}"],
     Just [" 0: \\x{ab}"],
     Nothing,
     Nothing]
,
testRegex "(?<=(.))X" [ERROR]
    ["WXYZ",
     "\\x{256}XYZ ",
     "*** Failers",
     "XYZ "]
    [Just [" 0: X"],
     Just [" 1: W"],
     Just [" 0: X"],
     Just [" 1: \\x{256}"],
     Nothing,
     Nothing]
,
testRegex "X(\\C{3})" [ERROR]
    ["X\\x{1234}"]
    [Just [" 0: X\\x{1234}"],
     Just [" 1: \\x{1234}"]]
,
testRegex "X(\\C{4})" [ERROR]
    ["X\\x{1234}YZ",
     "",
     "/X\\C*/8",
     "XYZabcdce",
     "",
     "/X\\C*?/8",
     "XYZabcde",
     "",
     "/X\\C{3,5}/8",
     "Xabcdefg   ",
     "X\\x{1234} ",
     "X\\x{1234}YZ",
     "X\\x{1234}\\x{512}  ",
     "X\\x{1234}\\x{512}YZ"]
    [Just [" 0: X\\x{1234}Y"],
     Just [" 1: \\x{1234}Y"],
     Just ["/X\\C*/8"],
     Just [" 0: XYZabcdce"],
     Just ["/X\\C*?/8"],
     Just [" 0: X"],
     Just ["/X\\C{3,5}/8"],
     Just [" 0: Xabcde"],
     Just [" 0: X\\x{1234}"],
     Just [" 0: X\\x{1234}YZ"],
     Just [" 0: X\\x{1234}\\x{512}"],
     Just [" 0: X\\x{1234}\\x{512}"]]
,
testRegex "X\\C{3,5}?" [ERROR]
    ["Xabcdefg   ",
     "X\\x{1234} ",
     "X\\x{1234}YZ",
     "X\\x{1234}\\x{512}  "]
    [Just [" 0: Xabc"],
     Just [" 0: X\\x{1234}"],
     Just [" 0: X\\x{1234}"],
     Just [" 0: X\\x{1234}"]]
,
testRegex "[^a]+" [ERROR]
    ["bcd",
     "\\x{100}aY\\x{256}Z ",
     "",
     "/^[^a]{2}/8",
     "\\x{100}bc",
     "",
     "/^[^a]{2,}/8",
     "\\x{100}bcAa"]
    [Just [" 0: bcd"],
     Just [" 0: \\x{100}"],
     Just [" 0: Y\\x{256}Z"],
     Just ["/^[^a]{2}/8"],
     Just [" 0: \\x{100}b"],
     Just ["/^[^a]{2,}/8"],
     Just [" 0: \\x{100}bcA"]]
,
testRegex "^[^a]{2,}?" [ERROR]
    ["\\x{100}bca"]
    [Just [" 0: \\x{100}b"]]
,
testRegex "[^a]+" [ERROR]
    ["bcd",
     "\\x{100}aY\\x{256}Z ",
     "",
     "/^[^a]{2}/8i",
     "\\x{100}bc",
     "",
     "/^[^a]{2,}/8i",
     "\\x{100}bcAa"]
    [Just [" 0: bcd"],
     Just [" 0: \\x{100}"],
     Just [" 0: Y\\x{256}Z"],
     Just ["/^[^a]{2}/8i"],
     Just [" 0: \\x{100}b"],
     Just ["/^[^a]{2,}/8i"],
     Just [" 0: \\x{100}bc"]]
,
testRegex "^[^a]{2,}?" [caseless]
    ["\\x{100}bca"]
    [Just [" 0: \\x{100}b"]]
,
testRegex "\\x{100}{0,0}" [ERROR]
    ["abcd",
     "",
     "/\\x{100}?/8",
     "abcd",
     "\\x{100}\\x{100} "]
    [Just [" 0: "],
     Just ["/\\x{100}?/8"],
     Just [" 0: "],
     Just [" 0: \\x{100}"]]
,
testRegex "\\x{100}{0,3}" [ERROR]
    ["\\x{100}\\x{100} ",
     "\\x{100}\\x{100}\\x{100}\\x{100} ",
     "",
     "/\\x{100}*/8",
     "abce",
     "\\x{100}\\x{100}\\x{100}\\x{100} "]
    [Just [" 0: \\x{100}\\x{100}"],
     Just [" 0: \\x{100}\\x{100}\\x{100}"],
     Just ["/\\x{100}*/8"],
     Just [" 0: "],
     Just [" 0: \\x{100}\\x{100}\\x{100}\\x{100}"]]
,
testRegex "\\x{100}{1,1}" [ERROR]
    ["abcd\\x{100}\\x{100}\\x{100}\\x{100} "]
    [Just [" 0: \\x{100}"]]
,
testRegex "\\x{100}{1,3}" [ERROR]
    ["abcd\\x{100}\\x{100}\\x{100}\\x{100} "]
    [Just [" 0: \\x{100}\\x{100}\\x{100}"]]
,
testRegex "\\x{100}+" [ERROR]
    ["abcd\\x{100}\\x{100}\\x{100}\\x{100} "]
    [Just [" 0: \\x{100}\\x{100}\\x{100}\\x{100}"]]
,
testRegex "\\x{100}{3}" [ERROR]
    ["abcd\\x{100}\\x{100}\\x{100}XX"]
    [Just [" 0: \\x{100}\\x{100}\\x{100}"]]
,
testRegex "\\x{100}{3,5}" [ERROR]
    ["abcd\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}XX"]
    [Just [" 0: \\x{100}\\x{100}\\x{100}\\x{100}\\x{100}"]]
,
testRegex "\\x{100}{3,}" [ERROR]
    ["abcd\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}XX"]
    [Just [" 0: \\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}"]]
,
testRegex "(?<=a\\x{100}{2}b)X" [ERROR]
    ["Xyyya\\x{100}\\x{100}bXzzz"]
    [Just [" 0: X"],
     Just [" 0+ zzz"]]
,
testRegex "\\D*" [ERROR]
    ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]
    [Just [" 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]]
,
testRegex "\\D*" [ERROR]
    ["\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}"]
    [Just [" 0: \\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}\\x{100}"]]
,
testRegex "\\D" [ERROR]
    ["1X2",
     "1\\x{100}2 ",
     "",
     "/>\\S/8",
     "> >X Y",
     "> >\\x{100} Y",
     "",
     "/\\d/8",
     "\\x{100}3",
     "",
     "/\\s/8",
     "\\x{100} X",
     "",
     "/\\D+/8",
     "12abcd34",
     "*** Failers",
     "1234  "]
    [Just [" 0: X"],
     Just [" 0: \\x{100}"],
     Just ["/>\\S/8"],
     Just [" 0: >X"],
     Just [" 0: >\\x{100}"],
     Just ["/\\d/8"],
     Just [" 0: 3"],
     Just ["/\\s/8"],
     Just [" 0:  "],
     Just ["/\\D+/8"],
     Just [" 0: abcd"],
     Just [" 0: *** Failers"],
     Nothing]
,
testRegex "\\D{2,3}" [ERROR]
    ["12abcd34",
     "12ab34",
     "*** Failers  ",
     "1234",
     "12a34  "]
    [Just [" 0: abc"],
     Just [" 0: ab"],
     Just [" 0: ***"],
     Nothing,
     Nothing]
,
testRegex "\\D{2,3}?" [ERROR]
    ["12abcd34",
     "12ab34",
     "*** Failers  ",
     "1234",
     "12a34  "]
    [Just [" 0: ab"],
     Just [" 0: ab"],
     Just [" 0: **"],
     Nothing,
     Nothing]
,
testRegex "\\d+" [ERROR]
    ["12abcd34",
     "*** Failers"]
    [Just [" 0: 12"],
     Nothing]
,
testRegex "\\d{2,3}" [ERROR]
    ["12abcd34",
     "1234abcd",
     "*** Failers  ",
     "1.4 "]
    [Just [" 0: 12"],
     Just [" 0: 123"],
     Nothing,
     Nothing]
,
testRegex "\\d{2,3}?" [ERROR]
    ["12abcd34",
     "1234abcd",
     "*** Failers  ",
     "1.4 "]
    [Just [" 0: 12"],
     Just [" 0: 12"],
     Nothing,
     Nothing]
,
testRegex "\\S+" [ERROR]
    ["12abcd34",
     "*** Failers",
     "\\    \\ "]
    [Just [" 0: 12abcd34"],
     Just [" 0: ***"],
     Nothing]
,
testRegex "\\S{2,3}" [ERROR]
    ["12abcd34",
     "1234abcd",
     "*** Failers",
     "\\     \\  "]
    [Just [" 0: 12a"],
     Just [" 0: 123"],
     Just [" 0: ***"],
     Nothing]
,
testRegex "\\S{2,3}?" [ERROR]
    ["12abcd34",
     "1234abcd",
     "*** Failers",
     "\\     \\  "]
    [Just [" 0: 12"],
     Just [" 0: 12"],
     Just [" 0: **"],
     Nothing]
,
testRegex ">\\s+<" [ERROR]
    ["12>      <34",
     "*** Failers"]
    [Just [" 0: >      <"],
     Just [" 0+ 34"],
     Nothing]
,
testRegex ">\\s{2,3}<" [ERROR]
    ["ab>  <cd",
     "ab>   <ce",
     "*** Failers",
     "ab>    <cd "]
    [Just [" 0: >  <"],
     Just [" 0+ cd"],
     Just [" 0: >   <"],
     Just [" 0+ ce"],
     Nothing,
     Nothing]
,
testRegex ">\\s{2,3}?<" [ERROR]
    ["ab>  <cd",
     "ab>   <ce",
     "*** Failers",
     "ab>    <cd "]
    [Just [" 0: >  <"],
     Just [" 0+ cd"],
     Just [" 0: >   <"],
     Just [" 0+ ce"],
     Nothing,
     Nothing]
,
testRegex "\\w+" [ERROR]
    ["12      34",
     "*** Failers",
     "+++=*! "]
    [Just [" 0: 12"],
     Just [" 0: Failers"],
     Nothing]
,
testRegex "\\w{2,3}" [ERROR]
    ["ab  cd",
     "abcd ce",
     "*** Failers",
     "a.b.c"]
    [Just [" 0: ab"],
     Just [" 0: abc"],
     Just [" 0: Fai"],
     Nothing]
,
testRegex "\\w{2,3}?" [ERROR]
    ["ab  cd",
     "abcd ce",
     "*** Failers",
     "a.b.c"]
    [Just [" 0: ab"],
     Just [" 0: ab"],
     Just [" 0: Fa"],
     Nothing]
,
testRegex "\\W+" [ERROR]
    ["12====34",
     "*** Failers",
     "abcd "]
    [Just [" 0: ===="],
     Just [" 0: *** "],
     Nothing]
,
testRegex "\\W{2,3}" [ERROR]
    ["ab====cd",
     "ab==cd",
     "*** Failers",
     "a.b.c"]
    [Just [" 0: ==="],
     Just [" 0: =="],
     Just [" 0: ***"],
     Nothing]
,
testRegex "\\W{2,3}?" [ERROR]
    ["ab====cd",
     "ab==cd",
     "*** Failers",
     "a.b.c"]
    [Just [" 0: =="],
     Just [" 0: =="],
     Just [" 0: **"],
     Nothing]
,
testRegex "[\\x{100}]" [ERROR]
    ["\\x{100}",
     "Z\\x{100}",
     "\\x{100}Z",
     "*** Failers "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{100}"],
     Just [" 0: \\x{100}"],
     Nothing]
,
testRegex "[Z\\x{100}]" [ERROR]
    ["Z\\x{100}",
     "\\x{100}",
     "\\x{100}Z",
     "*** Failers "]
    [Just [" 0: Z"],
     Just [" 0: \\x{100}"],
     Just [" 0: \\x{100}"],
     Nothing]
,
testRegex "[\\x{100}\\x{200}]" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Nothing]
,
testRegex "[\\x{100}-\\x{200}]" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{111}cd ",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{111}"],
     Nothing]
,
testRegex "[z-\\x{200}]" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{111}cd ",
     "abzcd",
     "ab|cd  ",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{111}"],
     Just [" 0: z"],
     Just [" 0: |"],
     Nothing]
,
testRegex "[Q\\x{100}\\x{200}]" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "Q? ",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: Q"],
     Nothing]
,
testRegex "[Q\\x{100}-\\x{200}]" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{111}cd ",
     "Q? ",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{111}"],
     Just [" 0: Q"],
     Nothing]
,
testRegex "[Qz-\\x{200}]" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{111}cd ",
     "abzcd",
     "ab|cd  ",
     "Q? ",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{111}"],
     Just [" 0: z"],
     Just [" 0: |"],
     Just [" 0: Q"],
     Nothing]
,
testRegex "[\\x{100}\\x{200}]{1,3}" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{200}\\x{100}\\x{200}\\x{100}cd",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{200}\\x{100}\\x{200}"],
     Nothing]
,
testRegex "[\\x{100}\\x{200}]{1,3}?" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{200}\\x{100}\\x{200}\\x{100}cd",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{200}"],
     Nothing]
,
testRegex "[Q\\x{100}\\x{200}]{1,3}" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{200}\\x{100}\\x{200}\\x{100}cd",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{200}\\x{100}\\x{200}"],
     Nothing]
,
testRegex "[Q\\x{100}\\x{200}]{1,3}?" [ERROR]
    ["ab\\x{100}cd",
     "ab\\x{200}cd",
     "ab\\x{200}\\x{100}\\x{200}\\x{100}cd",
     "*** Failers  "]
    [Just [" 0: \\x{100}"],
     Just [" 0: \\x{200}"],
     Just [" 0: \\x{200}"],
     Nothing]
,
testRegex "(?<=[\\x{100}\\x{200}])X" [ERROR]
    ["abc\\x{200}X",
     "abc\\x{100}X ",
     "*** Failers",
     "X  "]
    [Just [" 0: X"],
     Just [" 0: X"],
     Nothing,
     Nothing]
,
testRegex "(?<=[Q\\x{100}\\x{200}])X" [ERROR]
    ["abc\\x{200}X",
     "abc\\x{100}X ",
     "abQX ",
     "*** Failers",
     "X  "]
    [Just [" 0: X"],
     Just [" 0: X"],
     Just [" 0: X"],
     Nothing,
     Nothing]
,
testRegex "(?<=[\\x{100}\\x{200}]{3})X" [ERROR]
    ["abc\\x{100}\\x{200}\\x{100}X",
     "*** Failers",
     "abc\\x{200}X",
     "X  "]
    [Just [" 0: X"],
     Nothing,
     Nothing,
     Nothing]
,
testRegex "[^\\x{100}\\x{200}]X" [ERROR]
    ["AX",
     "\\x{150}X",
     "\\x{500}X ",
     "*** Failers",
     "\\x{100}X",
     "\\x{200}X   "]
    [Just [" 0: AX"],
     Just [" 0: \\x{150}X"],
     Just [" 0: \\x{500}X"],
     Nothing,
     Nothing,
     Nothing]
,
testRegex "[^Q\\x{100}\\x{200}]X" [ERROR]
    ["AX",
     "\\x{150}X",
     "\\x{500}X ",
     "*** Failers",
     "\\x{100}X",
     "\\x{200}X   ",
     "QX "]
    [Just [" 0: AX"],
     Just [" 0: \\x{150}X"],
     Just [" 0: \\x{500}X"],
     Nothing,
     Nothing,
     Nothing,
     Nothing]
,
testRegex "[^\\x{100}-\\x{200}]X" [ERROR]
    ["AX",
     "\\x{500}X ",
     "*** Failers",
     "\\x{100}X",
     "\\x{150}X",
     "\\x{200}X   "]
    [Just [" 0: AX"],
     Just [" 0: \\x{500}X"],
     Nothing,
     Nothing,
     Nothing,
     Nothing]
,
testRegex "a\\Cb" []
    ["aXb",
     "a\\nb",
     "",
     "/a\\Cb/8",
     "aXb",
     "a\\nb",
     "*** Failers ",
     "a\\x{100}b "]
    [Just [" 0: aXb"],
     Just [" 0: a\\x0ab"],
     Just ["/a\\Cb/8"],
     Just [" 0: aXb"],
     Just [" 0: a\\x{0a}b"],
     Nothing,
     Nothing]
,
testRegex "[z-\\x{100}]" [caseless]
    ["z",
     "Z ",
     "\\x{100}",
     "*** Failers",
     "\\x{102}",
     "y    "]
    [Just [" 0: z"],
     Just [" 0: Z"],
     Just [" 0: \\x{100}"],
     Nothing,
     Nothing,
     Nothing]
,
testRegex "[\\xFF]" []
    [">\\xff<"]
    [Just [" 0: \\xff"]]
,
testRegex "[\\xff]" [ERROR]
    [">\\x{ff}<"]
    [Just [" 0: \\x{ff}"]]
,
testRegex "[^\\xFF]" []
    ["XYZ"]
    [Just [" 0: X"]]
,
testRegex "[^\\xff]" [ERROR]
    ["XYZ",
     "\\x{123} "]
    [Just [" 0: X"],
     Just [" 0: \\x{123}"]]
,
testRegex "^[ac]*b" [ERROR]
    ["xb"]
    [Nothing]
,
testRegex "^[ac\\x{100}]*b" [ERROR]
    ["xb"]
    [Nothing]
,
testRegex "^[^x]*b" [caseless]
    ["xb"]
    [Nothing]
,
testRegex "^[^x]*b" [ERROR]
    ["xb",
     "",
     "/^\\d*b/8",
     "xb "]
    [Nothing,
     Just ["/^\\d*b/8"],
     Nothing]
,
testRegex "(|a)" [ERROR]
    ["catac",
     "a\\x{256}a "]
    [Just [" 0: "],
     Just [" 1: "],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: a"],
     Just [" 1: a"],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: a"],
     Just [" 1: a"],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: a"],
     Just [" 1: a"],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: "],
     Just [" 1: "],
     Just [" 0: a"],
     Just [" 1: a"],
     Just [" 0: "],
     Just [" 1: "]]
,
testRegex "^\\x{85}$" [caseless]
    ["\\x{85}"]
    [Just [" 0: \\x{85}"]]
,
testRegex "^\225\136\180" [ERROR]
    ["\225\136\180 "]
    [Just [" 0: \\x{1234}"]]
,
testRegex "^\\\225\136\180" [ERROR]
    ["\225\136\180 "]
    [Just [" 0: \\x{1234}"]]
,
testRegex "(?s)(.{1,5})" [ERROR]
    ["abcdefg",
     "ab"]
    [Just [" 0: abcde"],
     Just [" 1: abcde"],
     Just [" 0: ab"],
     Just [" 1: ab"]]
,
testRegex "a*\\x{100}*\\w" [ERROR]
    ["a "]
    [Just [" 0: a"]]
,
testRegex "\\S\\S" [ERROR]
    ["A\\x{a3}BC",
     "",
     "/\\S{2}/8g",
     "A\\x{a3}BC",
     "",
     "/\\W\\W/8g",
     "+\\x{a3}== "]
    [Just [" 0: A\\x{a3}"],
     Just [" 0: BC"],
     Just ["/\\S{2}/8g"],
     Just [" 0: A\\x{a3}"],
     Just [" 0: BC"],
     Just ["/\\W\\W/8g"],
     Just [" 0: +\\x{a3}"],
     Just [" 0: =="]]
,
testRegex "\\W{2}" [ERROR]
    ["+\\x{a3}== "]
    [Just [" 0: +\\x{a3}"],
     Just [" 0: =="]]
,
testRegex " End of testinput4 " []
    []
    []