testRegex "abc" [] ["abc", "", "/ab*c/", "abc", "abbbbc", "ac", "", "/ab+c/", "abc", "abbbbbbc", "*** Failers ", "ac", "ab", "", "/a*/", "a", "aaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\F ", "", "/(a|abcd|african)/", "a", "abcd", "african", "", "/^abc/", "abcdef", "*** Failers", "xyzabc", "xyz\\nabc ", "", "/^abc/m", "abcdef", "xyz\\nabc ", "*** Failers", "xyzabc", "", "/\\Aabc/", "abcdef", "*** Failers", "xyzabc", "xyz\\nabc ", "", "/\\Aabc/m", "abcdef", "*** Failers", "xyzabc", "xyz\\nabc ", "", "/\\Gabc/", "abcdef", "xyzabc\\>3", "*** Failers", "xyzabc ", "xyzabc\\>2 ", "", "/x\\dy\\Dz/", "x9yzz", "x0y+z", "*** Failers", "xyz", "xxy0z ", "", "/x\\sy\\Sz/", "x yzz", "x y+z", "*** Failers", "xyz", "xxyyz", "", "/x\\wy\\Wz/", "xxy+z", "*** Failers", "xxy0z", "x+y+z ", "", "/x.y/", "x+y", "x-y", "*** Failers", "x\\ny", "", "/x.y/s", "x+y", "x-y", "x\\ny"] [Just [" 0: abc"], Just ["/ab*c/"], Just [" 0: abc"], Just [" 0: abbbbc"], Just [" 0: ac"], Just ["/ab+c/"], Just [" 0: abc"], Just [" 0: abbbbbbc"], Nothing, Nothing, Nothing, Just ["/a*/"], Just [" 0: a"], Just [" 1: "], Just [" 0: aaaaaaaaaaaaaaaaa"], Just [" 1: aaaaaaaaaaaaaaaa"], Just [" 2: aaaaaaaaaaaaaaa"], Just [" 3: aaaaaaaaaaaaaa"], Just [" 4: aaaaaaaaaaaaa"], Just [" 5: aaaaaaaaaaaa"], Just [" 6: aaaaaaaaaaa"], Just [" 7: aaaaaaaaaa"], Just [" 8: aaaaaaaaa"], Just [" 9: aaaaaaaa"], Just ["10: aaaaaaa"], Just ["11: aaaaaa"], Just ["12: aaaaa"], Just ["13: aaaa"], Just ["14: aaa"], Just ["15: aa"], Just ["16: a"], Just ["17: "], Just ["Matched, but too many subsidiary matches"], Just [" 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"], Just [" 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"], Just [" 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa"], Just [" 3: aaaaaaaaaaaaaaaaaaaaaaaaaaa"], Just [" 4: aaaaaaaaaaaaaaaaaaaaaaaaaa"], Just [" 5: aaaaaaaaaaaaaaaaaaaaaaaaa"], Just [" 6: aaaaaaaaaaaaaaaaaaaaaaaa"], Just [" 7: aaaaaaaaaaaaaaaaaaaaaaa"], Just [" 8: aaaaaaaaaaaaaaaaaaaaaa"], Just [" 9: aaaaaaaaaaaaaaaaaaaaa"], Just ["10: aaaaaaaaaaaaaaaaaaaa"], Just ["11: aaaaaaaaaaaaaaaaaaa"], Just ["12: aaaaaaaaaaaaaaaaaa"], Just ["13: aaaaaaaaaaaaaaaaa"], Just ["14: aaaaaaaaaaaaaaaa"], Just ["15: aaaaaaaaaaaaaaa"], Just ["16: aaaaaaaaaaaaaa"], Just ["17: aaaaaaaaaaaaa"], Just ["18: aaaaaaaaaaaa"], Just ["19: aaaaaaaaaaa"], Just ["20: aaaaaaaaaa"], Just ["21: aaaaaaaaa"], Just [" 0: "], Just ["/(a|abcd|african)/"], Just [" 0: a"], Just [" 0: abcd"], Just [" 1: a"], Just [" 0: african"], Just [" 1: a"], Just ["/^abc/"], Just [" 0: abc"], Nothing, Nothing, Nothing, Just ["/^abc/m"], Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Just ["/\\Aabc/"], Just [" 0: abc"], Nothing, Nothing, Nothing, Just ["/\\Aabc/m"], Just [" 0: abc"], Nothing, Nothing, Nothing, Just ["/\\Gabc/"], Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Nothing, Just ["/x\\dy\\Dz/"], Just [" 0: x9yzz"], Just [" 0: x0y+z"], Nothing, Nothing, Nothing, Just ["/x\\sy\\Sz/"], Just [" 0: x yzz"], Just [" 0: x y+z"], Nothing, Nothing, Nothing, Just ["/x\\wy\\Wz/"], Just [" 0: xxy+z"], Nothing, Nothing, Nothing, Just ["/x.y/"], Just [" 0: x+y"], Just [" 0: x-y"], Nothing, Nothing, Just ["/x.y/s"], Just [" 0: x+y"], Just [" 0: x-y"], Just [" 0: x\\x0ay"]] , testRegex "(a.b(?s)c.d|x.y)p.q" [] ["a+bc+dp+q", "a+bc\\ndp+q", "x\\nyp+q ", "*** Failers ", "a\\nbc\\ndp+q", "a+bc\\ndp\\nq", "x\\nyp\\nq "] [Just [" 0: a+bc+dp+q"], Just [" 0: a+bc\\x0adp+q"], Just [" 0: x\\x0ayp+q"], Nothing, Nothing, Nothing, Nothing] , testRegex "a\\d\\z" [] ["ba0", "*** Failers", "ba0\\n", "ba0\\ncd "] [Just [" 0: a0"], Nothing, Nothing, Nothing] , testRegex "a\\d\\z" [ERROR] ["ba0", "*** Failers", "ba0\\n", "ba0\\ncd "] [Just [" 0: a0"], Nothing, Nothing, Nothing] , testRegex "a\\d\\Z" [] ["ba0", "ba0\\n", "*** Failers", "ba0\\ncd "] [Just [" 0: a0"], Just [" 0: a0"], Nothing, Nothing] , testRegex "a\\d\\Z" [ERROR] ["ba0", "ba0\\n", "*** Failers", "ba0\\ncd "] [Just [" 0: a0"], Just [" 0: a0"], Nothing, Nothing] , testRegex "a\\d$" [] ["ba0", "ba0\\n", "*** Failers", "ba0\\ncd "] [Just [" 0: a0"], Just [" 0: a0"], Nothing, Nothing] , testRegex "a\\d$" [ERROR] ["ba0", "ba0\\n", "ba0\\ncd ", "*** Failers"] [Just [" 0: a0"], Just [" 0: a0"], Just [" 0: a0"], Nothing] , testRegex "abc" [caseless] ["abc", "aBc", "ABC", "", "/[^a]/", "abcd", "", "/ab?\\w/", "abz", "abbz", "azz "] [Just [" 0: abc"], Just [" 0: aBc"], Just [" 0: ABC"], Just ["/[^a]/"], Just [" 0: b"], Just ["/ab?\\w/"], Just [" 0: abz"], Just [" 1: ab"], Just [" 0: abb"], Just [" 1: ab"], Just [" 0: az"]] , testRegex "x{0,3}yz" [] ["ayzq", "axyzq", "axxyz", "axxxyzq", "axxxxyzq", "*** Failers", "ax", "axx ", "", "/x{3}yz/", "axxxyzq", "axxxxyzq", "*** Failers", "ax", "axx ", "ayzq", "axyzq", "axxyz", "", "/x{2,3}yz/", "axxyz", "axxxyzq", "axxxxyzq", "*** Failers", "ax", "axx ", "ayzq", "axyzq", "", "/[^a]+/", "bac", "bcdefax", "*** Failers", "aaaaa "] [Just [" 0: yz"], Just [" 0: xyz"], Just [" 0: xxyz"], Just [" 0: xxxyz"], Just [" 0: xxxyz"], Nothing, Nothing, Nothing, Just ["/x{3}yz/"], Just [" 0: xxxyz"], Just [" 0: xxxyz"], Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Just ["/x{2,3}yz/"], Just [" 0: xxyz"], Just [" 0: xxxyz"], Just [" 0: xxxyz"], Nothing, Nothing, Nothing, Nothing, Nothing, Just ["/[^a]+/"], Just [" 0: b"], Just [" 0: bcdef"], Just [" 1: bcde"], Just [" 2: bcd"], Just [" 3: bc"], Just [" 4: b"], Just [" 0: *** F"], Just [" 1: *** "], Just [" 2: ***"], Just [" 3: **"], Just [" 4: *"], Nothing] , testRegex "[^a]*" [] ["bac", "bcdefax", "*** Failers", "aaaaa ", "", "/[^a]{3,5}/", "xyz", "awxyza", "abcdefa", "abcdefghijk", "*** Failers", "axya", "axa", "aaaaa "] [Just [" 0: b"], Just [" 1: "], Just [" 0: bcdef"], Just [" 1: bcde"], Just [" 2: bcd"], Just [" 3: bc"], Just [" 4: b"], Just [" 5: "], Just [" 0: *** F"], Just [" 1: *** "], Just [" 2: ***"], Just [" 3: **"], Just [" 4: *"], Just [" 5: "], Just [" 0: "], Just ["/[^a]{3,5}/"], Just [" 0: xyz"], Just [" 0: wxyz"], Just [" 1: wxy"], Just [" 0: bcdef"], Just [" 1: bcde"], Just [" 2: bcd"], Just [" 0: bcdef"], Just [" 1: bcde"], Just [" 2: bcd"], Just [" 0: *** F"], Just [" 1: *** "], Just [" 2: ***"], Nothing, Nothing, Nothing] , testRegex "\\d*" [] ["1234b567", "xyz", "", "/\\D*/", "a1234b567", "xyz", "", "/\\d+/", "ab1234c56", "*** Failers", "xyz", "", "/\\D+/", "ab123c56", "*** Failers", "789", "", "/\\d?A/", "045ABC", "ABC", "*** Failers", "XYZ", "", "/\\D?A/", "ABC", "BAC", "9ABC ", "*** Failers"] [Just [" 0: 1234"], Just [" 1: 123"], Just [" 2: 12"], Just [" 3: 1"], Just [" 4: "], Just [" 0: "], Just ["/\\D*/"], Just [" 0: a"], Just [" 1: "], Just [" 0: xyz"], Just [" 1: xy"], Just [" 2: x"], Just [" 3: "], Just ["/\\d+/"], Just [" 0: 1234"], Just [" 1: 123"], Just [" 2: 12"], Just [" 3: 1"], Nothing, Nothing, Just ["/\\D+/"], Just [" 0: ab"], Just [" 1: a"], Just [" 0: *** Failers"], Just [" 1: *** Failer"], Just [" 2: *** Faile"], Just [" 3: *** Fail"], Just [" 4: *** Fai"], Just [" 5: *** Fa"], Just [" 6: *** F"], Just [" 7: *** "], Just [" 8: ***"], Just [" 9: **"], Just ["10: *"], Nothing, Just ["/\\d?A/"], Just [" 0: 5A"], Just [" 0: A"], Nothing, Nothing, Just ["/\\D?A/"], Just [" 0: A"], Just [" 0: BA"], Just [" 0: A"], Nothing] , testRegex "a+" [] ["aaaa"] [Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"]] , testRegex "^.*xyz" [] ["xyz", "ggggggggxyz", "", "/^.+xyz/", "abcdxyz", "axyz", "*** Failers", "xyz", "", "/^.?xyz/", "xyz", "cxyz "] [Just [" 0: xyz"], Just [" 0: ggggggggxyz"], Just ["/^.+xyz/"], Just [" 0: abcdxyz"], Just [" 0: axyz"], Nothing, Nothing, Just ["/^.?xyz/"], Just [" 0: xyz"], Just [" 0: cxyz"]] , testRegex "^\\d{2,3}X" [] ["12X", "123X", "*** Failers", "X", "1X", "1234X "] [Just [" 0: 12X"], Just [" 0: 123X"], Nothing, Nothing, Nothing, Nothing] , testRegex "^[abcd]\\d" [] ["a45", "b93", "c99z", "d04", "*** Failers", "e45", "abcd ", "abcd1234", "1234 "] [Just [" 0: a4"], Just [" 0: b9"], Just [" 0: c9"], Just [" 0: d0"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^[abcd]*\\d" [] ["a45", "b93", "c99z", "d04", "abcd1234", "1234 ", "*** Failers", "e45", "abcd "] [Just [" 0: a4"], Just [" 0: b9"], Just [" 0: c9"], Just [" 0: d0"], Just [" 0: abcd1"], Just [" 0: 1"], Nothing, Nothing, Nothing] , testRegex "^[abcd]+\\d" [] ["a45", "b93", "c99z", "d04", "abcd1234", "*** Failers", "1234 ", "e45", "abcd "] [Just [" 0: a4"], Just [" 0: b9"], Just [" 0: c9"], Just [" 0: d0"], Just [" 0: abcd1"], Nothing, Nothing, Nothing, Nothing] , testRegex "^a+X" [] ["aX", "aaX "] [Just [" 0: aX"], Just [" 0: aaX"]] , testRegex "^[abcd]?\\d" [] ["a45", "b93", "c99z", "d04", "1234 ", "*** Failers", "abcd1234", "e45"] [Just [" 0: a4"], Just [" 0: b9"], Just [" 0: c9"], Just [" 0: d0"], Just [" 0: 1"], Nothing, Nothing, Nothing] , testRegex "^[abcd]{2,3}\\d" [] ["ab45", "bcd93", "*** Failers", "1234 ", "a36 ", "abcd1234", "ee45"] [Just [" 0: ab4"], Just [" 0: bcd9"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^(abc)*\\d" [] ["abc45", "abcabcabc45", "42xyz ", "*** Failers"] [Just [" 0: abc4"], Just [" 0: abcabcabc4"], Just [" 0: 4"], Nothing] , testRegex "^(abc)+\\d" [] ["abc45", "abcabcabc45", "*** Failers", "42xyz "] [Just [" 0: abc4"], Just [" 0: abcabcabc4"], Nothing, Nothing] , testRegex "^(abc)?\\d" [] ["abc45", "42xyz ", "*** Failers", "abcabcabc45"] [Just [" 0: abc4"], Just [" 0: 4"], Nothing, Nothing] , testRegex "^(abc){2,3}\\d" [] ["abcabc45", "abcabcabc45", "*** Failers", "abcabcabcabc45", "abc45", "42xyz "] [Just [" 0: abcabc4"], Just [" 0: abcabcabc4"], Nothing, Nothing, Nothing, Nothing] , testRegex "1(abc|xyz)2(?1)3" [] ["1abc2abc3456", "1abc2xyz3456 "] [Just [" 0: 1abc2abc3"], Just [" 0: 1abc2xyz3"]] , testRegex "^(a*\\w|ab)=(a*\\w|ab)" [] ["ab=ab"] [Just [" 0: ab=ab"], Just [" 1: ab=a"]] , testRegex "^(a*\\w|ab)=(?1)" [] ["ab=ab"] [Just [" 0: ab=ab"]] , testRegex "^([^()]|\\((?1)*\\))*$" [] ["abc", "a(b)c", "a(b(c))d ", "*** Failers)", "a(b(c)d "] [Just [" 0: abc"], Just [" 0: a(b)c"], Just [" 0: a(b(c))d"], Nothing, Nothing] , testRegex "^>abc>([^()]|\\((?1)*\\))*abc>123abc>1(2)3abc>(1(2)3)abc>123abc>1(2)3abc>(1(2)3)a*)\\d" [] ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876", "*** Failers ", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"] [Just [" 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9"], Nothing, Nothing] , testRegex "< (?: (?(R) \\d++ | [^<>]*+) | (?R)) * >" [ERROR] ["<>", "", " hij>", " hij>", "def> ", " ", "*** Failers", ""], Just [" 0: "], Just [" 0: hij>"], Just [" 0: "], Just [" 0: def>"], Just [" 0: <>"], Nothing, Nothing] , testRegex "^(?(?=abc)\\w{3}:|\\d\\d)$" [ERROR] ["abc: ", "12 ", "*** Failers ", "123 ", "xyz ", "", "/^(?(?!abc)\\d\\d|\\w{3}:)$/ ", "abc: ", "12 ", "*** Failers", "123", "xyz "] [Just [" 0: abc:"], Just [" 0: 12"], Nothing, Nothing, Nothing, Just ["/^(?(?!abc)\\d\\d|\\w{3}:)$/ "], Just [" 0: abc:"], Just [" 0: 12"], Nothing, Nothing, Nothing] , testRegex "^(?=abc)\\w{5}:$" [ERROR] ["abcde: ", "*** Failers ", "abc.. ", "123 ", "vwxyz ", "", "/^(?!abc)\\d\\d$/ ", "12 ", "*** Failers", "abcde:", "abc.. ", "123", "vwxyz "] [Just [" 0: abcde:"], Nothing, Nothing, Nothing, Nothing, Just ["/^(?!abc)\\d\\d$/ "], Just [" 0: 12"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "(?<=abc|xy)123" [] ["abc12345", "wxy123z", "*** Failers", "123abc"] [Just [" 0: 123"], Just [" 0: 123"], Nothing, Nothing] , testRegex "(?abcxyz"], Just [" 0: abcxyz"], Just ["--->123abcxyz999"], Just [" 0: abcxyz"]] , testRegex "(ab|cd){3,4}" [ERROR] ["ababab", "abcdabcd", "abcdcdcdcdcd "] [Just ["--->ababab"], Just [" +0 ^ (ab|cd){3,4}"], Just [" +1 ^ a"], Just [" +4 ^ c"], Just [" +2 ^^ b"], Just [" +3 ^ ^ |"], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +2 ^ ^ b"], Just [" +3 ^ ^ |"], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +2 ^ ^ b"], Just [" +3 ^ ^ |"], Just ["+12 ^ ^ "], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" 0: ababab"], Just ["--->abcdabcd"], Just [" +0 ^ (ab|cd){3,4}"], Just [" +1 ^ a"], Just [" +4 ^ c"], Just [" +2 ^^ b"], Just [" +3 ^ ^ |"], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +5 ^ ^ d"], Just [" +6 ^ ^ )"], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +2 ^ ^ b"], Just [" +3 ^ ^ |"], Just ["+12 ^ ^ "], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +5 ^ ^ d"], Just [" +6 ^ ^ )"], Just ["+12 ^ ^ "], Just [" 0: abcdabcd"], Just [" 1: abcdab"], Just ["--->abcdcdcdcdcd"], Just [" +0 ^ (ab|cd){3,4}"], Just [" +1 ^ a"], Just [" +4 ^ c"], Just [" +2 ^^ b"], Just [" +3 ^ ^ |"], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +5 ^ ^ d"], Just [" +6 ^ ^ )"], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +5 ^ ^ d"], Just [" +6 ^ ^ )"], Just ["+12 ^ ^ "], Just [" +1 ^ ^ a"], Just [" +4 ^ ^ c"], Just [" +5 ^ ^ d"], Just [" +6 ^ ^ )"], Just ["+12 ^ ^ "], Just [" 0: abcdcdcd"], Just [" 1: abcdcd"]] , testRegex "^abc" [] ["abcdef", "*** Failers", "abcdef\\B "] [Just [" 0: abc"], Nothing, Nothing] , testRegex "^(a*|xyz)" [] ["bcd", "aaabcd", "xyz", "xyz\\N ", "*** Failers", "bcd\\N ", "", "/xyz$/", "xyz", "xyz\\n", "*** Failers", "xyz\\Z", "xyz\\n\\Z ", "", "/xyz$/m", "xyz", "xyz\\n ", "abcxyz\\npqr ", "abcxyz\\npqr\\Z ", "xyz\\n\\Z ", "*** Failers", "xyz\\Z"] [Just [" 0: "], Just [" 0: aaa"], Just [" 1: aa"], Just [" 2: a"], Just [" 3: "], Just [" 0: xyz"], Just [" 1: "], Just [" 0: xyz"], Just [" 0: "], Nothing, Just ["/xyz$/"], Just [" 0: xyz"], Just [" 0: xyz"], Nothing, Nothing, Nothing, Just ["/xyz$/m"], Just [" 0: xyz"], Just [" 0: xyz"], Just [" 0: xyz"], Just [" 0: xyz"], Just [" 0: xyz"], Nothing, Nothing] , testRegex "\\Gabc" [] ["abcdef", "defabcxyz\\>3 ", "*** Failers ", "defabcxyz"] [Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing] , testRegex "^abcdef" [] ["ab\\P", "abcde\\P", "abcdef\\P", "*** Failers", "abx\\P "] [Just ["Partial match: ab"], Just ["Partial match: abcde"], Just [" 0: abcdef"], Nothing, Nothing] , testRegex "^a{2,4}\\d+z" [] ["a\\P", "aa\\P", "aa2\\P ", "aaa\\P", "aaa23\\P ", "aaaa12345\\P", "aa0z\\P", "aaaa4444444444444z\\P ", "*** Failers", "az\\P ", "aaaaa\\P ", "a56\\P "] [Just ["Partial match: a"], Just ["Partial match: aa"], Just ["Partial match: aa2"], Just ["Partial match: aaa"], Just ["Partial match: aaa23"], Just ["Partial match: aaaa12345"], Just [" 0: aa0z"], Just [" 0: aaaa4444444444444z"], Nothing, Nothing, Nothing, Nothing] , testRegex "^abcdef" [] ["abc\\P", "def\\R ", "", "/(?<=foo)bar/", "xyzfo\\P ", "foob\\P\\>2 ", "foobar...\\R\\P\\>4 ", "xyzfo\\P", "foobar\\>2 ", "*** Failers", "xyzfo\\P", "obar\\R "] [Just ["Partial match: abc"], Just [" 0: def"], Just ["/(?<=foo)bar/"], Nothing, Just ["Partial match: b"], Just [" 0: ar"], Nothing, Just [" 0: bar"], Nothing, Nothing, Nothing] , testRegex "(ab*(cd|ef))+X" [] ["adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkj\\P\\Z", "lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefa\\P\\B\\Z", "cdabbbbbbbb\\P\\R\\B\\Z", "efabbbbbbbbbbbbbbbb\\P\\R\\B\\Z", "bbbbbbbbbbbbcdXyasdfadf\\P\\R\\B\\Z "] [Nothing, Just ["Partial match: abbbbbbcdaefabbbbbbbefa"], Just ["Partial match: cdabbbbbbbb"], Just ["Partial match: efabbbbbbbbbbbbbbbb"], Just [" 0: bbbbbbbbbbbbcdX"]] , testRegex "(a|b)" [ERROR] [">>aaabxyzpqrrrabbxyyyypqAzz", ">aaaabxyzpqrrrabbxyyyypqAzz", ">>>>abcxyzpqrrrabbxyyyypqAzz", "*** Failers", "abxyzpqrrabbxyyyypqAzz", "abxyzpqrrrrabbxyyyypqAzz", "abxyzpqrrrabxyyyypqAzz", "aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz", "aaaabcxyzzzzpqrrrabbbxyyypqAzz", "aaabcxyzpqrrrabbxyyyypqqqqqqqAzz"] [Just [" 0: abxyzpqrrrabbxyyyypqAzz"], Just [" 0: abxyzpqrrrabbxyyyypqAzz"], Just [" 0: aabxyzpqrrrabbxyyyypqAzz"], Just [" 0: aaabxyzpqrrrabbxyyyypqAzz"], Just [" 0: aaaabxyzpqrrrabbxyyyypqAzz"], Just [" 0: abcxyzpqrrrabbxyyyypqAzz"], Just [" 0: aabcxyzpqrrrabbxyyyypqAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypqAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypqqAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypqqqAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypqqqqAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypqqqqqAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypqqqqqqAzz"], Just [" 0: aaaabcxyzpqrrrabbxyyyypqAzz"], Just [" 0: abxyzzpqrrrabbxyyyypqAzz"], Just [" 0: aabxyzzzpqrrrabbxyyyypqAzz"], Just [" 0: aaabxyzzzzpqrrrabbxyyyypqAzz"], Just [" 0: aaaabxyzzzzpqrrrabbxyyyypqAzz"], Just [" 0: abcxyzzpqrrrabbxyyyypqAzz"], Just [" 0: aabcxyzzzpqrrrabbxyyyypqAzz"], Just [" 0: aaabcxyzzzzpqrrrabbxyyyypqAzz"], Just [" 0: aaaabcxyzzzzpqrrrabbxyyyypqAzz"], Just [" 0: aaaabcxyzzzzpqrrrabbbxyyyypqAzz"], Just [" 0: aaaabcxyzzzzpqrrrabbbxyyyyypqAzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypABzz"], Just [" 0: aaabcxyzpqrrrabbxyyyypABBzz"], Just [" 0: aaabxyzpqrrrabbxyyyypqAzz"], Just [" 0: aaaabxyzpqrrrabbxyyyypqAzz"], Just [" 0: abcxyzpqrrrabbxyyyypqAzz"], Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^(abc){1,2}zz" [] ["abczz", "abcabczz", "*** Failers", "zz", "abcabcabczz", ">>abczz"] [Just [" 0: abczz"], Just [" 0: abcabczz"], Nothing, Nothing, Nothing, Nothing] , testRegex "^(b+?|a){1,2}?c" [] ["bc", "bbc", "bbbc", "bac", "bbac", "aac", "abbbbbbbbbbbc", "bbbbbbbbbbbac", "*** Failers", "aaac", "abbbbbbbbbbbac"] [Just [" 0: bc"], Just [" 0: bbc"], Just [" 0: bbbc"], Just [" 0: bac"], Just [" 0: bbac"], Just [" 0: aac"], Just [" 0: abbbbbbbbbbbc"], Just [" 0: bbbbbbbbbbbac"], Nothing, Nothing, Nothing] , testRegex "^(b+|a){1,2}c" [] ["bc", "bbc", "bbbc", "bac", "bbac", "aac", "abbbbbbbbbbbc", "bbbbbbbbbbbac", "*** Failers", "aaac", "abbbbbbbbbbbac"] [Just [" 0: bc"], Just [" 0: bbc"], Just [" 0: bbbc"], Just [" 0: bac"], Just [" 0: bbac"], Just [" 0: aac"], Just [" 0: abbbbbbbbbbbc"], Just [" 0: bbbbbbbbbbbac"], Nothing, Nothing, Nothing] , testRegex "^(b+|a){1,2}?bc" [] ["bbc"] [Just [" 0: bbc"]] , testRegex "^(b*|ba){1,2}?bc" [] ["babc", "bbabc", "bababc", "*** Failers", "bababbc", "babababc"] [Just [" 0: babc"], Just [" 0: bbabc"], Just [" 0: bababc"], Nothing, Nothing, Nothing] , testRegex "^(ba|b*){1,2}?bc" [] ["babc", "bbabc", "bababc", "*** Failers", "bababbc", "babababc"] [Just [" 0: babc"], Just [" 0: bbabc"], Just [" 0: bababc"], Nothing, Nothing, Nothing] , testRegex "^\\ca\\cA\\c[\\c{\\c:" [] ["\\x01\\x01\\e;z"] [Just [" 0: \\x01\\x01\\x1b;z"]] , testRegex "^[ab\\]cde]" [] ["athing", "bthing", "]thing", "cthing", "dthing", "ething", "*** Failers", "fthing", "[thing", "\\\\thing"] [Just [" 0: a"], Just [" 0: b"], Just [" 0: ]"], Just [" 0: c"], Just [" 0: d"], Just [" 0: e"], Nothing, Nothing, Nothing, Nothing] , testRegex "^[]cde]" [] ["]thing", "cthing", "dthing", "ething", "*** Failers", "athing", "fthing"] [Just [" 0: ]"], Just [" 0: c"], Just [" 0: d"], Just [" 0: e"], Nothing, Nothing, Nothing] , testRegex "^[^ab\\]cde]" [] ["fthing", "[thing", "\\\\thing", "*** Failers", "athing", "bthing", "]thing", "cthing", "dthing", "ething"] [Just [" 0: f"], Just [" 0: ["], Just [" 0: \\"], Just [" 0: *"], Nothing, Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^[^]cde]" [] ["athing", "fthing", "*** Failers", "]thing", "cthing", "dthing", "ething"] [Just [" 0: a"], Just [" 0: f"], Just [" 0: *"], Nothing, Nothing, Nothing, Nothing] , testRegex "^\\\129" [] ["\129"] [Just [" 0: \\x81"]] , testRegex "^\255" [] ["\255"] [Just [" 0: \\xff"]] , testRegex "^[0-9]+$" [] ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "100", "*** Failers", "abc"] [Just [" 0: 0"], Just [" 0: 1"], Just [" 0: 2"], Just [" 0: 3"], Just [" 0: 4"], Just [" 0: 5"], Just [" 0: 6"], Just [" 0: 7"], Just [" 0: 8"], Just [" 0: 9"], Just [" 0: 10"], Just [" 0: 100"], Nothing, Nothing] , testRegex "^.*nter" [] ["enter", "inter", "uponter"] [Just [" 0: enter"], Just [" 0: inter"], Just [" 0: uponter"]] , testRegex "^xxx[0-9]+$" [] ["xxx0", "xxx1234", "*** Failers", "xxx"] [Just [" 0: xxx0"], Just [" 0: xxx1234"], Nothing, Nothing] , testRegex "^.+[0-9][0-9][0-9]$" [] ["x123", "xx123", "123456", "*** Failers", "123", "x1234"] [Just [" 0: x123"], Just [" 0: xx123"], Just [" 0: 123456"], Nothing, Nothing, Just [" 0: x1234"]] , testRegex "^.+?[0-9][0-9][0-9]$" [] ["x123", "xx123", "123456", "*** Failers", "123", "x1234"] [Just [" 0: x123"], Just [" 0: xx123"], Just [" 0: 123456"], Nothing, Nothing, Just [" 0: x1234"]] , testRegex "^([^!]+)!(.+)=apquxz\\.ixr\\.zzz\\.ac\\.uk$" [] ["abc!pqr=apquxz.ixr.zzz.ac.uk", "*** Failers", "!pqr=apquxz.ixr.zzz.ac.uk", "abc!=apquxz.ixr.zzz.ac.uk", "abc!pqr=apquxz:ixr.zzz.ac.uk", "abc!pqr=apquxz.ixr.zzz.ac.ukk"] [Just [" 0: abc!pqr=apquxz.ixr.zzz.ac.uk"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex ":" [] ["Well, we need a colon: somewhere", "*** Fail if we don't"] [Just [" 0: :"], Nothing] , testRegex "([\\da-f:]+)$" [caseless] ["0abc", "abc", "fed", "E", "::", "5f03:12C0::932e", "fed def", "Any old stuff", "*** Failers", "0zzz", "gzzz", "fed\\x20", "Any old rubbish"] [Just [" 0: 0abc"], Just [" 0: abc"], Just [" 0: fed"], Just [" 0: E"], Just [" 0: ::"], Just [" 0: 5f03:12C0::932e"], Just [" 0: def"], Just [" 0: ff"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^.*\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$" [] [".1.2.3", "A.12.123.0", "*** Failers", ".1.2.3333", "1.2.3", "1234.2.3"] [Just [" 0: .1.2.3"], Just [" 0: A.12.123.0"], Nothing, Nothing, Nothing, Nothing] , testRegex "^(\\d+)\\s+IN\\s+SOA\\s+(\\S+)\\s+(\\S+)\\s*\\(\\s*$" [] ["1 IN SOA non-sp1 non-sp2(", "1 IN SOA non-sp1 non-sp2 (", "*** Failers", "1IN SOA non-sp1 non-sp2("] [Just [" 0: 1 IN SOA non-sp1 non-sp2("], Just [" 0: 1 IN SOA non-sp1 non-sp2 ("], Nothing, Nothing] , testRegex "^[a-zA-Z\\d][a-zA-Z\\d\\-]*(\\.[a-zA-Z\\d][a-zA-z\\d\\-]*)*\\.$" [] ["a.", "Z.", "2.", "ab-c.pq-r.", "sxk.zzz.ac.uk.", "x-.y-.", "*** Failers", "-abc.peq."] [Just [" 0: a."], Just [" 0: Z."], Just [" 0: 2."], Just [" 0: ab-c.pq-r."], Just [" 0: sxk.zzz.ac.uk."], Just [" 0: x-.y-."], Nothing, Nothing] , testRegex "^\\*\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?(\\.[a-z]([a-z\\-\\d]*[a-z\\d]+)?)*$" [] ["*.a", "*.b0-a", "*.c3-b.c", "*.c-a.b-c", "*** Failers", "*.0", "*.a-", "*.a-b.c-", "*.c-a.0-c"] [Just [" 0: *.a"], Just [" 0: *.b0-a"], Just [" 0: *.c3-b.c"], Just [" 0: *.c-a.b-c"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^(?=ab(de))(abd)(e)" [] ["abde"] [Just [" 0: abde"]] , testRegex "^(?!(ab)de|x)(abd)(f)" [] ["abdf"] [Just [" 0: abdf"]] , testRegex "^(?=(ab(cd)))(ab)" [] ["abcd"] [Just [" 0: ab"]] , testRegex "^[\\da-f](\\.[\\da-f])*$" [caseless] ["a.b.c.d", "A.B.C.D", "a.b.c.1.2.3.C"] [Just [" 0: a.b.c.d"], Just [" 0: A.B.C.D"], Just [" 0: a.b.c.1.2.3.C"]] , testRegex "^\\\".*\\\"\\s*(;.*)?$" [] ["\\\"1234\\\"", "\\\"abcd\\\" ;", "\\\"\\\" ; rhubarb", "*** Failers", "\\\"1234\\\" : things"] [Just [" 0: \"1234\""], Just [" 0: \"abcd\" ;"], Just [" 0: \"\" ; rhubarb"], Nothing, Nothing] , testRegex "^$" [] ["\\", "*** Failers"] [Just [" 0: "], Nothing] , testRegex " ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)" [ERROR] ["ab c", "*** Failers", "abc", "ab cde"] [Just [" 0: ab c"], Nothing, Nothing, Nothing] , testRegex "(?x) ^ a (?# begins with a) b\\sc (?# then b c) $ (?# then end)" [] ["ab c", "*** Failers", "abc", "ab cde"] [Just [" 0: ab c"], Nothing, Nothing, Nothing] , testRegex "^ a\\ b[c ]d $" [ERROR] ["a bcd", "a b d", "*** Failers", "abcd", "ab d"] [Just [" 0: a bcd"], Just [" 0: a b d"], Nothing, Nothing, Nothing] , testRegex "^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$" [] ["abcdefhijklm"] [Just [" 0: abcdefhijklm"]] , testRegex "^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$" [] ["abcdefhijklm"] [Just [" 0: abcdefhijklm"]] , testRegex "^[\\w][\\W][\\s][\\S][\\d][\\D][\\b][\\n][\\c]][\\022]" [] ["a+ Z0+\\x08\\n\\x1d\\x12"] [Just [" 0: a+ Z0+\\x08\\x0a\\x1d\\x12"]] , testRegex "^[.^$|()*+?{,}]+" [] [".^\\$(*+)|{?,?}"] [Just [" 0: .^$(*+)|{?,?}"], Just [" 1: .^$(*+)|{?,?"], Just [" 2: .^$(*+)|{?,"], Just [" 3: .^$(*+)|{?"], Just [" 4: .^$(*+)|{"], Just [" 5: .^$(*+)|"], Just [" 6: .^$(*+)"], Just [" 7: .^$(*+"], Just [" 8: .^$(*"], Just [" 9: .^$("], Just ["10: .^$"], Just ["11: .^"], Just ["12: ."]] , testRegex "^a*\\w" [] ["z", "az", "aaaz", "a", "aa", "aaaa", "a+", "aa+"] [Just [" 0: z"], Just [" 0: az"], Just [" 1: a"], Just [" 0: aaaz"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"], Just [" 0: a"], Just [" 0: aa"], Just [" 1: a"], Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"], Just [" 0: a"], Just [" 0: aa"], Just [" 1: a"]] , testRegex "^a*?\\w" [] ["z", "az", "aaaz", "a", "aa", "aaaa", "a+", "aa+"] [Just [" 0: z"], Just [" 0: az"], Just [" 1: a"], Just [" 0: aaaz"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"], Just [" 0: a"], Just [" 0: aa"], Just [" 1: a"], Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"], Just [" 0: a"], Just [" 0: aa"], Just [" 1: a"]] , testRegex "^a+\\w" [] ["az", "aaaz", "aa", "aaaa", "aa+"] [Just [" 0: az"], Just [" 0: aaaz"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 0: aa"], Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 0: aa"]] , testRegex "^a+?\\w" [] ["az", "aaaz", "aa", "aaaa", "aa+"] [Just [" 0: az"], Just [" 0: aaaz"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 0: aa"], Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 0: aa"]] , testRegex "^\\d{8}\\w{2,}" [] ["1234567890", "12345678ab", "12345678__", "*** Failers", "1234567"] [Just [" 0: 1234567890"], Just [" 0: 12345678ab"], Just [" 0: 12345678__"], Nothing, Nothing] , testRegex "^[aeiou\\d]{4,5}$" [] ["uoie", "1234", "12345", "aaaaa", "*** Failers", "123456"] [Just [" 0: uoie"], Just [" 0: 1234"], Just [" 0: 12345"], Just [" 0: aaaaa"], Nothing, Nothing] , testRegex "^[aeiou\\d]{4,5}?" [] ["uoie", "1234", "12345", "aaaaa", "123456"] [Just [" 0: uoie"], Just [" 0: 1234"], Just [" 0: 12345"], Just [" 1: 1234"], Just [" 0: aaaaa"], Just [" 1: aaaa"], Just [" 0: 12345"], Just [" 1: 1234"]] , testRegex "^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]" [] ["From abcd Mon Sep 01 12:33:02 1997"] [Just [" 0: From abcd Mon Sep 01 12:33"]] , testRegex "^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:\\d\\d" [] ["From abcd Mon Sep 01 12:33:02 1997", "From abcd Mon Sep 1 12:33:02 1997", "*** Failers", "From abcd Sep 01 12:33:02 1997"] [Just [" 0: From abcd Mon Sep 01 12:33"], Just [" 0: From abcd Mon Sep 1 12:33"], Nothing, Nothing] , testRegex "^12.34" [ERROR] ["12\\n34", "12\\r34"] [Just [" 0: 12\\x0a34"], Just [" 0: 12\\x0d34"]] , testRegex "\\w+(?=\\t)" [] ["the quick brown\\t fox"] [Just [" 0: brown"]] , testRegex "foo(?!bar)(.*)" [] ["foobar is foolish see?"] [Just [" 0: foolish see?"], Just [" 1: foolish see"], Just [" 2: foolish se"], Just [" 3: foolish s"], Just [" 4: foolish "], Just [" 5: foolish"], Just [" 6: foolis"], Just [" 7: fooli"], Just [" 8: fool"], Just [" 9: foo"]] , testRegex "(?:(?!foo)...|^.{0,2})bar(.*)" [] ["foobar crowbar etc", "barrel", "2barrel", "A barrel"] [Just [" 0: rowbar etc"], Just [" 1: rowbar et"], Just [" 2: rowbar e"], Just [" 3: rowbar "], Just [" 4: rowbar"], Just [" 0: barrel"], Just [" 1: barre"], Just [" 2: barr"], Just [" 3: bar"], Just [" 0: 2barrel"], Just [" 1: 2barre"], Just [" 2: 2barr"], Just [" 3: 2bar"], Just [" 0: A barrel"], Just [" 1: A barre"], Just [" 2: A barr"], Just [" 3: A bar"]] , testRegex "^(\\D*)(?=\\d)(?!123)" [] ["abc456", "*** Failers", "abc123"] [Just [" 0: abc"], Nothing, Nothing] , testRegex "ERROR" [] ["inside)/", "1234"] [Just [" 0: 1234"]] , testRegex "ERROR" [] ["/x", "1234"] [Just [" 0: 1234"]] , testRegex "ERROR" [] ["abcd/x", "abcd"] [Just [" 0: abcd"]] , testRegex "^abcd#rhubarb" [ERROR] ["abcd"] [Just [" 0: abcd"]] , testRegex "(?!^)abc" [] ["the abc", "*** Failers", "abc"] [Just [" 0: abc"], Nothing, Nothing] , testRegex "(?=^)abc" [] ["abc", "*** Failers", "the abc"] [Just [" 0: abc"], Nothing, Nothing] , testRegex "^[ab]{1,3}(ab*|b)" [] ["aabbbbb"] [Just [" 0: aabbbbb"], Just [" 1: aabbbb"], Just [" 2: aabbb"], Just [" 3: aabb"], Just [" 4: aab"], Just [" 5: aa"]] , testRegex "^[ab]{1,3}?(ab*|b)" [] ["aabbbbb"] [Just [" 0: aabbbbb"], Just [" 1: aabbbb"], Just [" 2: aabbb"], Just [" 3: aabb"], Just [" 4: aab"], Just [" 5: aa"]] , testRegex "^[ab]{1,3}?(ab*?|b)" [] ["aabbbbb"] [Just [" 0: aabbbbb"], Just [" 1: aabbbb"], Just [" 2: aabbb"], Just [" 3: aabb"], Just [" 4: aab"], Just [" 5: aa"]] , testRegex "^[ab]{1,3}(ab*?|b)" [] ["aabbbbb"] [Just [" 0: aabbbbb"], Just [" 1: aabbbb"], Just [" 2: aabbb"], Just [" 3: aabb"], Just [" 4: aab"], Just [" 5: aa"]] , testRegex "ERROR" [] ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* # optional leading comment", "(?: (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\" (?: # opening quote...", "[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote", "| # or", "\\\\ [^\\x80-\\xff] # Escaped something (something != CR)", ")* \" # closing quote", ") # initial word", "(?: (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* \\. (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\" (?: # opening quote...", "[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote", "| # or", "\\\\ [^\\x80-\\xff] # Escaped something (something != CR)", ")* \" # closing quote", ") )* # further okay, if led by a period", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* @ (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # initial subdomain", "(?: #", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* \\. # if led by a period...", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # ...further okay", ")*", "# address", "| # or", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\" (?: # opening quote...", "[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote", "| # or", "\\\\ [^\\x80-\\xff] # Escaped something (something != CR)", ")* \" # closing quote", ") # one word, optionally followed by....", "(?:", "[^()<>@,;:\".\\\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] | # atom and space parts, or...", "\\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) | # comments, or..."] [Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* # optional leading comment"], Just ["(?: (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\" (?: # opening quote..."], Just ["[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote"], Just ["| # or"], Just ["\\\\ [^\\x80-\\xff] # Escaped something (something != CR)"], Just [")* \" # closing quote"], Just [") # initial word"], Just ["(?: (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* \\. (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\" (?: # opening quote..."], Just ["[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote"], Just ["| # or"], Just ["\\\\ [^\\x80-\\xff] # Escaped something (something != CR)"], Just [")* \" # closing quote"], Just [") )* # further okay, if led by a period"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* @ (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # initial subdomain"], Just ["(?: #"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* \\. # if led by a period..."], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # ...further okay"], Just [")*"], Just ["# address"], Just ["| # or"], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\" (?: # opening quote..."], Just ["[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote"], Just ["| # or"], Just ["\\\\ [^\\x80-\\xff] # Escaped something (something != CR)"], Just [")* \" # closing quote"], Just [") # one word, optionally followed by...."], Just ["(?:"], Just ["[^()<>@,;:\".\\\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] | # atom and space parts, or..."], Just ["\\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) | # comments, or..."]] , testRegex "ERROR" [] ["[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote", "| # or", "\\\\ [^\\x80-\\xff] # Escaped something (something != CR)", ")* \" # closing quote", "# quoted strings", ")*", "< (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* # leading <", "(?: @ (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # initial subdomain", "(?: #", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* \\. # if led by a period...", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # ...further okay", ")*"] [Just ["[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote"], Just ["| # or"], Just ["\\\\ [^\\x80-\\xff] # Escaped something (something != CR)"], Just [")* \" # closing quote"], Just ["# quoted strings"], Just [")*"], Just ["< (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* # leading <"], Just ["(?: @ (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # initial subdomain"], Just ["(?: #"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* \\. # if led by a period..."], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # ...further okay"], Just [")*"]] , testRegex "ERROR" [] ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* , (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* @ (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # initial subdomain", "(?: #", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* \\. # if led by a period...", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # ...further okay", ")*", ")* # further okay, if led by comma", ": # closing colon", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* )? # optional route", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\" (?: # opening quote...", "[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote", "| # or", "\\\\ [^\\x80-\\xff] # Escaped something (something != CR)", ")* \" # closing quote", ") # initial word", "(?: (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* \\. (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\" (?: # opening quote...", "[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote", "| # or", "\\\\ [^\\x80-\\xff] # Escaped something (something != CR)", ")* \" # closing quote", ") )* # further okay, if led by a period", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* @ (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # initial subdomain", "(?: #", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* \\. # if led by a period...", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* (?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "| \\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ") # ...further okay", ")*", "# address spec", "(?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* > # trailing >", "# name and address", ") (?: [\\040\\t] | \\(", "(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*", "\\) )* # optional trailing comment", "/x", "Alan Other ", "", "user\\@dom.ain", "\\\"A. Other\\\" (a comment)", "A. Other (a comment)", "\\\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\\\"\\@x400-re.lay", "A missing angle @,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # initial subdomain"], Just ["(?: #"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* \\. # if led by a period..."], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # ...further okay"], Just [")*"], Just [")* # further okay, if led by comma"], Just [": # closing colon"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* )? # optional route"], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\" (?: # opening quote..."], Just ["[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote"], Just ["| # or"], Just ["\\\\ [^\\x80-\\xff] # Escaped something (something != CR)"], Just [")* \" # closing quote"], Just [") # initial word"], Just ["(?: (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* \\. (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\" (?: # opening quote..."], Just ["[^\\\\\\x80-\\xff\\n\\015\"] # Anything except backslash and quote"], Just ["| # or"], Just ["\\\\ [^\\x80-\\xff] # Escaped something (something != CR)"], Just [")* \" # closing quote"], Just [") )* # further okay, if led by a period"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* @ (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # initial subdomain"], Just ["(?: #"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* \\. # if led by a period..."], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* (?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["| \\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [") # ...further okay"], Just [")*"], Just ["# address spec"], Just ["(?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* > # trailing >"], Just ["# name and address"], Just [") (?: [\\040\\t] | \\("], Just ["(?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] | \\( (?: [^\\\\\\x80-\\xff\\n\\015()] | \\\\ [^\\x80-\\xff] )* \\) )*"], Just ["\\) )* # optional trailing comment"], Just ["/x"], Just [" 0: Alan Other "], Just [" 0: user@dom.ain"], Just [" 1: user@dom"], Just [" 0: user@dom.ain"], Just [" 1: user@dom"], Just [" 0: \"A. Other\" (a comment)"], Just [" 1: \"A. Other\" "], Just [" 2: \"A. Other\" "], Just [" 0: Other (a comment)"], Just [" 1: Other "], Just [" 2: Other "], Just [" 0: \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re.lay"], Just [" 1: \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re"], Just [" 0: user@some.where"], Just [" 1: user@some"], Nothing, Nothing] , testRegex "ERROR" [] ["(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional leading comment", "(?:", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "# Atom", "| # or", "\" # \"", "[^\\\\\\x80-\\xff\\n\\015\"] * # normal", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*", "\" # \"", "# Quoted string", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "\\.", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "# Atom", "| # or", "\" # \"", "[^\\\\\\x80-\\xff\\n\\015\"] * # normal", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*", "\" # \"", "# Quoted string", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# additional words", ")*", "@", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", "(?:", "\\.", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", ")*", "# address", "| # or", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "# Atom", "| # or", "\" # \"", "[^\\\\\\x80-\\xff\\n\\015\"] * # normal", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*", "\" # \"", "# Quoted string", ")", "# leading word", "[^()<>@,;:\".\\\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] * # \"normal\" atoms and or spaces", "(?:", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "|", "\" # \"", "[^\\\\\\x80-\\xff\\n\\015\"] * # normal", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*", "\" # \"", ") # \"special\" comment or quoted string", "[^()<>@,;:\".\\\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] * # more \"normal\"", ")*", "<", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# <", "(?:", "@", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", "(?:", "\\.", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", ")*", "(?: ,", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "@", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", "(?:", "\\.", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", ")*", ")* # additional domains", ":", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", ")? # optional route", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "# Atom", "| # or", "\" # \"", "[^\\\\\\x80-\\xff\\n\\015\"] * # normal", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*", "\" # \"", "# Quoted string", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "\\.", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "# Atom", "| # or", "\" # \"", "[^\\\\\\x80-\\xff\\n\\015\"] * # normal", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*", "\" # \"", "# Quoted string", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# additional words", ")*", "@", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", "(?:", "\\.", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "(?:", "[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters...", "(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom", "|", "\\[ # [", "(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff", "\\] # ]", ")", "[\\040\\t]* # Nab whitespace.", "(?:", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: # (", "(?: \\\\ [^\\x80-\\xff] |", "\\( # (", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", "(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*", "\\) # )", ") # special", "[^\\\\\\x80-\\xff\\n\\015()] * # normal*", ")* # )*", "\\) # )", "[\\040\\t]* )* # If comment found, allow more spaces.", "# optional trailing comments", ")*", "# address spec", "> # >", "# name and address", ")", "/x", "Alan Other ", "", "user\\@dom.ain", "\\\"A. Other\\\" (a comment)", "A. Other (a comment)", "\\\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\\\"\\@x400-re.lay", "A missing angle @,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["# Atom"], Just ["| # or"], Just ["\" # \""], Just ["[^\\\\\\x80-\\xff\\n\\015\"] * # normal"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*"], Just ["\" # \""], Just ["# Quoted string"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["\\."], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["# Atom"], Just ["| # or"], Just ["\" # \""], Just ["[^\\\\\\x80-\\xff\\n\\015\"] * # normal"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*"], Just ["\" # \""], Just ["# Quoted string"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# additional words"], Just [")*"], Just ["@"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just ["(?:"], Just ["\\."], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just [")*"], Just ["# address"], Just ["| # or"], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["# Atom"], Just ["| # or"], Just ["\" # \""], Just ["[^\\\\\\x80-\\xff\\n\\015\"] * # normal"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*"], Just ["\" # \""], Just ["# Quoted string"], Just [")"], Just ["# leading word"], Just ["[^()<>@,;:\".\\\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] * # \"normal\" atoms and or spaces"], Just ["(?:"], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["|"], Just ["\" # \""], Just ["[^\\\\\\x80-\\xff\\n\\015\"] * # normal"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*"], Just ["\" # \""], Just [") # \"special\" comment or quoted string"], Just ["[^()<>@,;:\".\\\\\\[\\]\\x80-\\xff\\000-\\010\\012-\\037] * # more \"normal\""], Just [")*"], Just ["<"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# <"], Just ["(?:"], Just ["@"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just ["(?:"], Just ["\\."], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just [")*"], Just ["(?: ,"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["@"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just ["(?:"], Just ["\\."], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just [")*"], Just [")* # additional domains"], Just [":"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just [")? # optional route"], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["# Atom"], Just ["| # or"], Just ["\" # \""], Just ["[^\\\\\\x80-\\xff\\n\\015\"] * # normal"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*"], Just ["\" # \""], Just ["# Quoted string"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["\\."], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["# Atom"], Just ["| # or"], Just ["\" # \""], Just ["[^\\\\\\x80-\\xff\\n\\015\"] * # normal"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015\"] * )* # ( special normal* )*"], Just ["\" # \""], Just ["# Quoted string"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# additional words"], Just [")*"], Just ["@"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just ["(?:"], Just ["\\."], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["(?:"], Just ["[^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]+ # some number of atom characters..."], Just ["(?![^(\\040)<>@,;:\".\\\\\\[\\]\\000-\\037\\x80-\\xff]) # ..not followed by something that could be part of an atom"], Just ["|"], Just ["\\[ # ["], Just ["(?: [^\\\\\\x80-\\xff\\n\\015\\[\\]] | \\\\ [^\\x80-\\xff] )* # stuff"], Just ["\\] # ]"], Just [")"], Just ["[\\040\\t]* # Nab whitespace."], Just ["(?:"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: # ("], Just ["(?: \\\\ [^\\x80-\\xff] |"], Just ["\\( # ("], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just ["(?: \\\\ [^\\x80-\\xff] [^\\\\\\x80-\\xff\\n\\015()] * )* # (special normal*)*"], Just ["\\) # )"], Just [") # special"], Just ["[^\\\\\\x80-\\xff\\n\\015()] * # normal*"], Just [")* # )*"], Just ["\\) # )"], Just ["[\\040\\t]* )* # If comment found, allow more spaces."], Just ["# optional trailing comments"], Just [")*"], Just ["# address spec"], Just ["> # >"], Just ["# name and address"], Just [")"], Just ["/x"], Just [" 0: Alan Other "], Just [" 0: user@dom.ain"], Just [" 1: user@dom"], Just [" 0: user@dom.ain"], Just [" 1: user@dom"], Just [" 0: \"A. Other\" "], Just [" 0: Other "], Just [" 0: \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re.lay"], Just [" 1: \"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re"], Just [" 0: user@some.where"], Just [" 1: user@some"], Nothing, Nothing] , testRegex "abc\\0def\\00pqr\\000xyz\\0000AB" [] ["abc\\0def\\00pqr\\000xyz\\0000AB", "abc456 abc\\0def\\00pqr\\000xyz\\0000ABCDE"] [Just [" 0: abc\\x00def\\x00pqr\\x00xyz\\x000AB"], Just [" 0: abc\\x00def\\x00pqr\\x00xyz\\x000AB"]] , testRegex "abc\\x0def\\x00pqr\\x000xyz\\x0000AB" [] ["abc\\x0def\\x00pqr\\x000xyz\\x0000AB", "abc456 abc\\x0def\\x00pqr\\x000xyz\\x0000ABCDE"] [Just [" 0: abc\\x0def\\x00pqr\\x000xyz\\x0000AB"], Just [" 0: abc\\x0def\\x00pqr\\x000xyz\\x0000AB"]] , testRegex "^[\\000-\\037]" [] ["\\0A", "\\01B", "\\037C"] [Just [" 0: \\x00"], Just [" 0: \\x01"], Just [" 0: \\x1f"]] , testRegex "\\0*" [] ["\\0\\0\\0\\0"] [Just [" 0: \\x00\\x00\\x00\\x00"], Just [" 1: \\x00\\x00\\x00"], Just [" 2: \\x00\\x00"], Just [" 3: \\x00"], Just [" 4: "]] , testRegex "A\\x0{2,3}Z" [] ["The A\\x0\\x0Z", "An A\\0\\x0\\0Z", "*** Failers", "A\\0Z", "A\\0\\x0\\0\\x0Z"] [Just [" 0: A\\x00\\x00Z"], Just [" 0: A\\x00\\x00\\x00Z"], Nothing, Nothing, Nothing] , testRegex "^\\s" [] ["\\040abc", "\\x0cabc", "\\nabc", "\\rabc", "\\tabc", "*** Failers", "abc"] [Just [" 0: "], Just [" 0: \\x0c"], Just [" 0: \\x0a"], Just [" 0: \\x0d"], Just [" 0: \\x09"], Nothing, Nothing] , testRegex "ERROR" [] ["c/x", "abc"] [Just [" 0: abc"]] , testRegex "ab{1,3}bc" [] ["abbbbc", "abbbc", "abbc", "*** Failers", "abc", "abbbbbc"] [Just [" 0: abbbbc"], Just [" 0: abbbc"], Just [" 0: abbc"], Nothing, Nothing, Nothing] , testRegex "([^.]*)\\.([^:]*):[T ]+(.*)" [] ["track1.title:TBlah blah blah"] [Just [" 0: track1.title:TBlah blah blah"], Just [" 1: track1.title:TBlah blah bla"], Just [" 2: track1.title:TBlah blah bl"], Just [" 3: track1.title:TBlah blah b"], Just [" 4: track1.title:TBlah blah "], Just [" 5: track1.title:TBlah blah"], Just [" 6: track1.title:TBlah bla"], Just [" 7: track1.title:TBlah bl"], Just [" 8: track1.title:TBlah b"], Just [" 9: track1.title:TBlah "], Just ["10: track1.title:TBlah"], Just ["11: track1.title:TBla"], Just ["12: track1.title:TBl"], Just ["13: track1.title:TB"], Just ["14: track1.title:T"]] , testRegex "([^.]*)\\.([^:]*):[T ]+(.*)" [caseless] ["track1.title:TBlah blah blah"] [Just [" 0: track1.title:TBlah blah blah"], Just [" 1: track1.title:TBlah blah bla"], Just [" 2: track1.title:TBlah blah bl"], Just [" 3: track1.title:TBlah blah b"], Just [" 4: track1.title:TBlah blah "], Just [" 5: track1.title:TBlah blah"], Just [" 6: track1.title:TBlah bla"], Just [" 7: track1.title:TBlah bl"], Just [" 8: track1.title:TBlah b"], Just [" 9: track1.title:TBlah "], Just ["10: track1.title:TBlah"], Just ["11: track1.title:TBla"], Just ["12: track1.title:TBl"], Just ["13: track1.title:TB"], Just ["14: track1.title:T"]] , testRegex "([^.]*)\\.([^:]*):[t ]+(.*)" [caseless] ["track1.title:TBlah blah blah"] [Just [" 0: track1.title:TBlah blah blah"], Just [" 1: track1.title:TBlah blah bla"], Just [" 2: track1.title:TBlah blah bl"], Just [" 3: track1.title:TBlah blah b"], Just [" 4: track1.title:TBlah blah "], Just [" 5: track1.title:TBlah blah"], Just [" 6: track1.title:TBlah bla"], Just [" 7: track1.title:TBlah bl"], Just [" 8: track1.title:TBlah b"], Just [" 9: track1.title:TBlah "], Just ["10: track1.title:TBlah"], Just ["11: track1.title:TBla"], Just ["12: track1.title:TBl"], Just ["13: track1.title:TB"], Just ["14: track1.title:T"]] , testRegex "^[W-c]+$" [] ["WXY_^abc", "*** Failers", "wxy"] [Just [" 0: WXY_^abc"], Nothing, Nothing] , testRegex "^[W-c]+$" [caseless] ["WXY_^abc", "wxy_^ABC"] [Just [" 0: WXY_^abc"], Just [" 0: wxy_^ABC"]] , testRegex "^[\\x3f-\\x5F]+$" [caseless] ["WXY_^abc", "wxy_^ABC"] [Just [" 0: WXY_^abc"], Just [" 0: wxy_^ABC"]] , testRegex "^abc$" [ERROR] ["abc", "qqq\\nabc", "abc\\nzzz", "qqq\\nabc\\nzzz"] [Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"]] , testRegex "^abc$" [] ["abc", "*** Failers", "qqq\\nabc", "abc\\nzzz", "qqq\\nabc\\nzzz"] [Just [" 0: abc"], Nothing, Nothing, Nothing, Nothing] , testRegex "\\Aabc\\Z" [ERROR] ["abc", "abc\\n ", "*** Failers", "qqq\\nabc", "abc\\nzzz", "qqq\\nabc\\nzzz", "", "/\\A(.)*\\Z/s", "abc\\ndef"] [Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Nothing, Nothing, Just ["/\\A(.)*\\Z/s"], Just [" 0: abc\\x0adef"]] , testRegex "\\A(.)*\\Z" [ERROR] ["*** Failers", "abc\\ndef"] [Just [" 0: *** Failers"], Nothing] , testRegex "(?:b)|(?::+)" [] ["b::c", "c::b"] [Just [" 0: b"], Just [" 0: ::"], Just [" 1: :"]] , testRegex "[-az]+" [] ["az-", "*** Failers", "b"] [Just [" 0: az-"], Just [" 1: az"], Just [" 2: a"], Just [" 0: a"], Nothing] , testRegex "[az-]+" [] ["za-", "*** Failers", "b"] [Just [" 0: za-"], Just [" 1: za"], Just [" 2: z"], Just [" 0: a"], Nothing] , testRegex "[a\\-z]+" [] ["a-z", "*** Failers", "b"] [Just [" 0: a-z"], Just [" 1: a-"], Just [" 2: a"], Just [" 0: a"], Nothing] , testRegex "[a-z]+" [] ["abcdxyz"] [Just [" 0: abcdxyz"], Just [" 1: abcdxy"], Just [" 2: abcdx"], Just [" 3: abcd"], Just [" 4: abc"], Just [" 5: ab"], Just [" 6: a"]] , testRegex "[\\d-]+" [] ["12-34", "*** Failers", "aaa"] [Just [" 0: 12-34"], Just [" 1: 12-3"], Just [" 2: 12-"], Just [" 3: 12"], Just [" 4: 1"], Nothing, Nothing] , testRegex "[\\d-z]+" [] ["12-34z", "*** Failers", "aaa"] [Just [" 0: 12-34z"], Just [" 1: 12-34"], Just [" 2: 12-3"], Just [" 3: 12-"], Just [" 4: 12"], Just [" 5: 1"], Nothing, Nothing] , testRegex "\\x5c" [] ["\\\\"] [Just [" 0: \\"]] , testRegex "\\x20Z" [] ["the Zoo", "*** Failers", "Zulu"] [Just [" 0: Z"], Nothing, Nothing] , testRegex "ab{3cd" [] ["ab{3cd"] [Just [" 0: ab{3cd"]] , testRegex "ab{3,cd" [] ["ab{3,cd"] [Just [" 0: ab{3,cd"]] , testRegex "ab{3,4a}cd" [] ["ab{3,4a}cd"] [Just [" 0: ab{3,4a}cd"]] , testRegex "{4,5a}bc" [] ["{4,5a}bc"] [Just [" 0: {4,5a}bc"]] , testRegex "^a.b" [ERROR] ["a\\rb", "*** Failers", "a\\nb"] [Just [" 0: a\\x0db"], Nothing, Nothing] , testRegex "abc$" [] ["abc", "abc\\n", "*** Failers", "abc\\ndef"] [Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing] , testRegex "(abc)\\123" [] ["abc\\x53"] [Just [" 0: abcS"]] , testRegex "(abc)\\223" [] ["abc\\x93"] [Just [" 0: abc\\x93"]] , testRegex "(abc)\\323" [] ["abc\\xd3"] [Just [" 0: abc\\xd3"]] , testRegex "(abc)\\100" [] ["abc\\x40", "abc\\100"] [Just [" 0: abc@"], Just [" 0: abc@"]] , testRegex "(abc)\\1000" [] ["abc\\x400", "abc\\x40\\x30", "abc\\1000", "abc\\100\\x30", "abc\\100\\060", "abc\\100\\60"] [Just [" 0: abc@0"], Just [" 0: abc@0"], Just [" 0: abc@0"], Just [" 0: abc@0"], Just [" 0: abc@0"], Just [" 0: abc@0"]] , testRegex "abc\\81" [] ["abc\\081", "abc\\0\\x38\\x31"] [Just [" 0: abc\\x0081"], Just [" 0: abc\\x0081"]] , testRegex "abc\\91" [] ["abc\\091", "abc\\0\\x39\\x31"] [Just [" 0: abc\\x0091"], Just [" 0: abc\\x0091"]] , testRegex "(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\\12\\123" [] ["abcdefghijk\\12S"] [Just [" 0: abcdefghijk\\x0aS"]] , testRegex "ab\\idef" [] ["abidef"] [Just [" 0: abidef"]] , testRegex "a{0}bc" [] ["bc"] [Just [" 0: bc"]] , testRegex "(a|(bc)){0,0}?xyz" [] ["xyz"] [Just [" 0: xyz"]] , testRegex "abc[\\10]de" [] ["abc\\010de"] [Just [" 0: abc\\x08de"]] , testRegex "abc[\\1]de" [] ["abc\\1de"] [Just [" 0: abc\\x01de"]] , testRegex "(abc)[\\1]de" [] ["abc\\1de"] [Just [" 0: abc\\x01de"]] , testRegex "(?s)a.b" [] ["a\\nb"] [Just [" 0: a\\x0ab"]] , testRegex "^([^a])([^\\b])([^c]*)([^d]{3,4})" [] ["baNOTccccd", "baNOTcccd", "baNOTccd", "bacccd", "*** Failers", "anything", "b\\bc ", "baccd"] [Just [" 0: baNOTcccc"], Just [" 1: baNOTccc"], Just [" 2: baNOTcc"], Just [" 3: baNOTc"], Just [" 4: baNOT"], Just [" 0: baNOTccc"], Just [" 1: baNOTcc"], Just [" 2: baNOTc"], Just [" 3: baNOT"], Just [" 0: baNOTcc"], Just [" 1: baNOTc"], Just [" 2: baNOT"], Just [" 0: baccc"], Just [" 0: *** Failers"], Just [" 1: *** Failer"], Just [" 2: *** Faile"], Just [" 3: *** Fail"], Just [" 4: *** Fai"], Just [" 5: *** Fa"], Just [" 6: *** F"], Nothing, Nothing, Nothing] , testRegex "[^a]" [] ["Abc", "", "/[^a]/i", "Abc "] [Just [" 0: A"], Just ["/[^a]/i"], Just [" 0: b"]] , testRegex "[^a]+" [] ["AAAaAbc", "", "/[^a]+/i", "AAAaAbc "] [Just [" 0: AAA"], Just [" 1: AA"], Just [" 2: A"], Just ["/[^a]+/i"], Just [" 0: bc"], Just [" 1: b"]] , testRegex "[^a]+" [] ["bbb\\nccc", "", "/[^k]$/", "abc", "*** Failers", "abk ", "", "/[^k]{2,3}$/", "abc", "kbc", "kabc ", "*** Failers", "abk", "akb", "akk "] [Just [" 0: bbb\\x0accc"], Just [" 1: bbb\\x0acc"], Just [" 2: bbb\\x0ac"], Just [" 3: bbb\\x0a"], Just [" 4: bbb"], Just [" 5: bb"], Just [" 6: b"], Just ["/[^k]$/"], Just [" 0: c"], Just [" 0: s"], Nothing, Just ["/[^k]{2,3}$/"], Just [" 0: abc"], Just [" 0: bc"], Just [" 0: abc"], Just [" 0: ers"], Nothing, Nothing, Nothing] , testRegex "^\\d{8,}\\@.+[^k]$" [] ["12345678\\@a.b.c.d", "123456789\\@x.y.z", "*** Failers", "12345678\\@x.y.uk", "1234567\\@a.b.c.d "] [Just [" 0: 12345678@a.b.c.d"], Just [" 0: 123456789@x.y.z"], Nothing, Nothing, Nothing] , testRegex "[^a]" [] ["aaaabcd", "aaAabcd "] [Just [" 0: b"], Just [" 0: A"]] , testRegex "[^a]" [caseless] ["aaaabcd", "aaAabcd "] [Just [" 0: b"], Just [" 0: b"]] , testRegex "[^az]" [] ["aaaabcd", "aaAabcd "] [Just [" 0: b"], Just [" 0: A"]] , testRegex "[^az]" [caseless] ["aaaabcd", "aaAabcd "] [Just [" 0: b"], Just [" 0: b"]] , testRegex "\\000\\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037\\040\\041\\042\\043\\044\\045\\046\\047\\050\\051\\052\\053\\054\\055\\056\\057\\060\\061\\062\\063\\064\\065\\066\\067\\070\\071\\072\\073\\074\\075\\076\\077\\100\\101\\102\\103\\104\\105\\106\\107\\110\\111\\112\\113\\114\\115\\116\\117\\120\\121\\122\\123\\124\\125\\126\\127\\130\\131\\132\\133\\134\\135\\136\\137\\140\\141\\142\\143\\144\\145\\146\\147\\150\\151\\152\\153\\154\\155\\156\\157\\160\\161\\162\\163\\164\\165\\166\\167\\170\\171\\172\\173\\174\\175\\176\\177\\200\\201\\202\\203\\204\\205\\206\\207\\210\\211\\212\\213\\214\\215\\216\\217\\220\\221\\222\\223\\224\\225\\226\\227\\230\\231\\232\\233\\234\\235\\236\\237\\240\\241\\242\\243\\244\\245\\246\\247\\250\\251\\252\\253\\254\\255\\256\\257\\260\\261\\262\\263\\264\\265\\266\\267\\270\\271\\272\\273\\274\\275\\276\\277\\300\\301\\302\\303\\304\\305\\306\\307\\310\\311\\312\\313\\314\\315\\316\\317\\320\\321\\322\\323\\324\\325\\326\\327\\330\\331\\332\\333\\334\\335\\336\\337\\340\\341\\342\\343\\344\\345\\346\\347\\350\\351\\352\\353\\354\\355\\356\\357\\360\\361\\362\\363\\364\\365\\366\\367\\370\\371\\372\\373\\374\\375\\376\\377" [] ["\\000\\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037\\040\\041\\042\\043\\044\\045\\046\\047\\050\\051\\052\\053\\054\\055\\056\\057\\060\\061\\062\\063\\064\\065\\066\\067\\070\\071\\072\\073\\074\\075\\076\\077\\100\\101\\102\\103\\104\\105\\106\\107\\110\\111\\112\\113\\114\\115\\116\\117\\120\\121\\122\\123\\124\\125\\126\\127\\130\\131\\132\\133\\134\\135\\136\\137\\140\\141\\142\\143\\144\\145\\146\\147\\150\\151\\152\\153\\154\\155\\156\\157\\160\\161\\162\\163\\164\\165\\166\\167\\170\\171\\172\\173\\174\\175\\176\\177\\200\\201\\202\\203\\204\\205\\206\\207\\210\\211\\212\\213\\214\\215\\216\\217\\220\\221\\222\\223\\224\\225\\226\\227\\230\\231\\232\\233\\234\\235\\236\\237\\240\\241\\242\\243\\244\\245\\246\\247\\250\\251\\252\\253\\254\\255\\256\\257\\260\\261\\262\\263\\264\\265\\266\\267\\270\\271\\272\\273\\274\\275\\276\\277\\300\\301\\302\\303\\304\\305\\306\\307\\310\\311\\312\\313\\314\\315\\316\\317\\320\\321\\322\\323\\324\\325\\326\\327\\330\\331\\332\\333\\334\\335\\336\\337\\340\\341\\342\\343\\344\\345\\346\\347\\350\\351\\352\\353\\354\\355\\356\\357\\360\\361\\362\\363\\364\\365\\366\\367\\370\\371\\372\\373\\374\\375\\376\\377"] [Just [" \\000\\001\\002\\003\\004\\005\\006\\007\\010\\011\\012\\013\\014\\015\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\033\\034\\035\\036\\037\\040\\041\\042\\043\\044\\045\\046\\047\\050\\051\\052\\053\\054\\055\\056\\057\\060\\061\\062\\063\\064\\065\\066\\067\\070\\071\\072\\073\\074\\075\\076\\077\\100\\101\\102\\103\\104\\105\\106\\107\\110\\111\\112\\113\\114\\115\\116\\117\\120\\121\\122\\123\\124\\125\\126\\127\\130\\131\\132\\133\\134\\135\\136\\137\\140\\141\\142\\143\\144\\145\\146\\147\\150\\151\\152\\153\\154\\155\\156\\157\\160\\161\\162\\163\\164\\165\\166\\167\\170\\171\\172\\173\\174\\175\\176\\177\\200\\201\\202\\203\\204\\205\\206\\207\\210\\211\\212\\213\\214\\215\\216\\217\\220\\221\\222\\223\\224\\225\\226\\227\\230\\231\\232\\233\\234\\235\\236\\237\\240\\241\\242\\243\\244\\245\\246\\247\\250\\251\\252\\253\\254\\255\\256\\257\\260\\261\\262\\263\\264\\265\\266\\267\\270\\271\\272\\273\\274\\275\\276\\277\\300\\301\\302\\303\\304\\305\\306\\307\\310\\311\\312\\313\\314\\315\\316\\317\\320\\321\\322\\323\\324\\325\\326\\327\\330\\331\\332\\333\\334\\335\\336\\337\\340\\341\\342\\343\\344\\345\\346\\347\\350\\351\\352\\353\\354\\355\\356\\357\\360\\361\\362\\363\\364\\365\\366\\367\\370\\371\\372\\373\\374\\375\\376\\377"], Just [" 0: \\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x09\\x0a\\x0b\\x0c\\x0d\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\\x7f\\x80\\x81\\x82\\x83\\x84\\x85\\x86\\x87\\x88\\x89\\x8a\\x8b\\x8c\\x8d\\x8e\\x8f\\x90\\x91\\x92\\x93\\x94\\x95\\x96\\x97\\x98\\x99\\x9a\\x9b\\x9c\\x9d\\x9e\\x9f\\xa0\\xa1\\xa2\\xa3\\xa4\\xa5\\xa6\\xa7\\xa8\\xa9\\xaa\\xab\\xac\\xad\\xae\\xaf\\xb0\\xb1\\xb2\\xb3\\xb4\\xb5\\xb6\\xb7\\xb8\\xb9\\xba\\xbb\\xbc\\xbd\\xbe\\xbf\\xc0\\xc1\\xc2\\xc3\\xc4\\xc5\\xc6\\xc7\\xc8\\xc9\\xca\\xcb\\xcc\\xcd\\xce\\xcf\\xd0\\xd1\\xd2\\xd3\\xd4\\xd5\\xd6\\xd7\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde\\xdf\\xe0\\xe1\\xe2\\xe3\\xe4\\xe5\\xe6\\xe7\\xe8\\xe9\\xea\\xeb\\xec\\xed\\xee\\xef\\xf0\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf7\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\\xff"]] , testRegex "P[^*]TAIRE[^*]{1,6}?LL" [] ["xxxxxxxxxxxPSTAIREISLLxxxxxxxxx"] [Just [" 0: PSTAIREISLL"]] , testRegex "P[^*]TAIRE[^*]{1,}?LL" [] ["xxxxxxxxxxxPSTAIREISLLxxxxxxxxx"] [Just [" 0: PSTAIREISLL"]] , testRegex "(\\.\\d\\d[1-9]?)\\d+" [] ["1.230003938", "1.875000282 ", "1.235 ", "", "/(\\.\\d\\d((?=0)|\\d(?=\\d)))/", "1.230003938 ", "1.875000282", "*** Failers ", "1.235 ", "", "/a(?)b/", "ab ", "", "/\\b(foo)\\s+(\\w+)/i", "Food is on the foo table", "", "/foo(.*)bar/", "The food is under the bar in the barn.", "", "/foo(.*?)bar/ ", "The food is under the bar in the barn."] [Just [" 0: .230003938"], Just [" 1: .23000393"], Just [" 2: .2300039"], Just [" 3: .230003"], Just [" 4: .23000"], Just [" 5: .2300"], Just [" 6: .230"], Just [" 0: .875000282"], Just [" 1: .87500028"], Just [" 2: .8750002"], Just [" 3: .875000"], Just [" 4: .87500"], Just [" 5: .8750"], Just [" 6: .875"], Just [" 0: .235"], Just ["/(\\.\\d\\d((?=0)|\\d(?=\\d)))/"], Just [" 0: .230"], Just [" 1: .23"], Just [" 0: .875"], Nothing, Nothing, Just ["/a(?)b/"], Just [" 0: ab"], Just ["/\\b(foo)\\s+(\\w+)/i"], Just [" 0: foo table"], Just [" 1: foo tabl"], Just [" 2: foo tab"], Just [" 3: foo ta"], Just [" 4: foo t"], Just ["/foo(.*)bar/"], Just [" 0: food is under the bar in the bar"], Just [" 1: food is under the bar"], Just ["/foo(.*?)bar/ "], Just [" 0: food is under the bar in the bar"], Just [" 1: food is under the bar"]] , testRegex "(.*)(\\d*)" [] ["I have 2 numbers: 53147", "", "/(.*)(\\d+)/", "I have 2 numbers: 53147", "", "/(.*?)(\\d*)/", "I have 2 numbers: 53147"] [Just ["Matched, but too many subsidiary matches"], Just [" 0: I have 2 numbers: 53147"], Just [" 1: I have 2 numbers: 5314"], Just [" 2: I have 2 numbers: 531"], Just [" 3: I have 2 numbers: 53"], Just [" 4: I have 2 numbers: 5"], Just [" 5: I have 2 numbers: "], Just [" 6: I have 2 numbers:"], Just [" 7: I have 2 numbers"], Just [" 8: I have 2 number"], Just [" 9: I have 2 numbe"], Just ["10: I have 2 numb"], Just ["11: I have 2 num"], Just ["12: I have 2 nu"], Just ["13: I have 2 n"], Just ["14: I have 2 "], Just ["15: I have 2"], Just ["16: I have "], Just ["17: I have"], Just ["18: I hav"], Just ["19: I ha"], Just ["20: I h"], Just ["21: I "], Just ["/(.*)(\\d+)/"], Just [" 0: I have 2 numbers: 53147"], Just [" 1: I have 2 numbers: 5314"], Just [" 2: I have 2 numbers: 531"], Just [" 3: I have 2 numbers: 53"], Just [" 4: I have 2 numbers: 5"], Just [" 5: I have 2"], Just ["/(.*?)(\\d*)/"], Just ["Matched, but too many subsidiary matches"], Just [" 0: I have 2 numbers: 53147"], Just [" 1: I have 2 numbers: 5314"], Just [" 2: I have 2 numbers: 531"], Just [" 3: I have 2 numbers: 53"], Just [" 4: I have 2 numbers: 5"], Just [" 5: I have 2 numbers: "], Just [" 6: I have 2 numbers:"], Just [" 7: I have 2 numbers"], Just [" 8: I have 2 number"], Just [" 9: I have 2 numbe"], Just ["10: I have 2 numb"], Just ["11: I have 2 num"], Just ["12: I have 2 nu"], Just ["13: I have 2 n"], Just ["14: I have 2 "], Just ["15: I have 2"], Just ["16: I have "], Just ["17: I have"], Just ["18: I hav"], Just ["19: I ha"], Just ["20: I h"], Just ["21: I "]] , testRegex "(.*?)(\\d+)" [] ["I have 2 numbers: 53147"] [Just [" 0: I have 2 numbers: 53147"], Just [" 1: I have 2 numbers: 5314"], Just [" 2: I have 2 numbers: 531"], Just [" 3: I have 2 numbers: 53"], Just [" 4: I have 2 numbers: 5"], Just [" 5: I have 2"]] , testRegex "(.*)(\\d+)$" [] ["I have 2 numbers: 53147"] [Just [" 0: I have 2 numbers: 53147"]] , testRegex "(.*?)(\\d+)$" [] ["I have 2 numbers: 53147"] [Just [" 0: I have 2 numbers: 53147"]] , testRegex "(.*)\\b(\\d+)$" [] ["I have 2 numbers: 53147"] [Just [" 0: I have 2 numbers: 53147"]] , testRegex "(.*\\D)(\\d+)$" [] ["I have 2 numbers: 53147"] [Just [" 0: I have 2 numbers: 53147"]] , testRegex "^\\D*(?!123)" [] ["ABC123", "", "/^(\\D*)(?=\\d)(?!123)/", "ABC445", "*** Failers", "ABC123", "", "/^[W-]46]/", "W46]789 ", "-46]789", "*** Failers", "Wall", "Zebra", "42", "[abcd] ", "]abcd[", "", "/^[W-\\]46]/", "W46]789 ", "Wall", "Zebra", "Xylophone ", "42", "[abcd] ", "]abcd[", "\\\\backslash ", "*** Failers", "-46]789", "well", "", "/\\d\\d\\/\\d\\d\\/\\d\\d\\d\\d/", "01/01/2000"] [Just [" 0: AB"], Just [" 1: A"], Just [" 2: "], Just ["/^(\\D*)(?=\\d)(?!123)/"], Just [" 0: ABC"], Nothing, Nothing, Just ["/^[W-]46]/"], Just [" 0: W46]"], Just [" 0: -46]"], Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Just ["/^[W-\\]46]/"], Just [" 0: W"], Just [" 0: W"], Just [" 0: Z"], Just [" 0: X"], Just [" 0: 4"], Just [" 0: ["], Just [" 0: ]"], Just [" 0: \\"], Nothing, Nothing, Nothing, Just ["/\\d\\d\\/\\d\\d\\/\\d\\d\\d\\d/"], Just [" 0: 01/01/2000"]] , testRegex "word (?:[a-zA-Z0-9]+ ){0,10}otherword" [] ["word cat dog elephant mussel cow horse canary baboon snake shark otherword", "word cat dog elephant mussel cow horse canary baboon snake shark"] [Just [" 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword"], Nothing] , testRegex "word (?:[a-zA-Z0-9]+ ){0,300}otherword" [] ["word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope"] [Nothing] , testRegex "^(a){0,0}" [] ["bcd", "abc", "aab "] [Just [" 0: "], Just [" 0: "], Just [" 0: "]] , testRegex "^(a){0,1}" [] ["bcd", "abc", "aab "] [Just [" 0: "], Just [" 0: a"], Just [" 1: "], Just [" 0: a"], Just [" 1: "]] , testRegex "^(a){0,2}" [] ["bcd", "abc", "aab "] [Just [" 0: "], Just [" 0: a"], Just [" 1: "], Just [" 0: aa"], Just [" 1: a"], Just [" 2: "]] , testRegex "^(a){0,3}" [] ["bcd", "abc", "aab", "aaa "] [Just [" 0: "], Just [" 0: a"], Just [" 1: "], Just [" 0: aa"], Just [" 1: a"], Just [" 2: "], Just [" 0: aaa"], Just [" 1: aa"], Just [" 2: a"], Just [" 3: "]] , testRegex "^(a){0,}" [] ["bcd", "abc", "aab", "aaa", "aaaaaaaa "] [Just [" 0: "], Just [" 0: a"], Just [" 1: "], Just [" 0: aa"], Just [" 1: a"], Just [" 2: "], Just [" 0: aaa"], Just [" 1: aa"], Just [" 2: a"], Just [" 3: "], Just [" 0: aaaaaaaa"], Just [" 1: aaaaaaa"], Just [" 2: aaaaaa"], Just [" 3: aaaaa"], Just [" 4: aaaa"], Just [" 5: aaa"], Just [" 6: aa"], Just [" 7: a"], Just [" 8: "]] , testRegex "^(a){1,1}" [] ["bcd", "abc", "aab "] [Nothing, Just [" 0: a"], Just [" 0: a"]] , testRegex "^(a){1,2}" [] ["bcd", "abc", "aab "] [Nothing, Just [" 0: a"], Just [" 0: aa"], Just [" 1: a"]] , testRegex "^(a){1,3}" [] ["bcd", "abc", "aab", "aaa "] [Nothing, Just [" 0: a"], Just [" 0: aa"], Just [" 1: a"], Just [" 0: aaa"], Just [" 1: aa"], Just [" 2: a"]] , testRegex "^(a){1,}" [] ["bcd", "abc", "aab", "aaa", "aaaaaaaa "] [Nothing, Just [" 0: a"], Just [" 0: aa"], Just [" 1: a"], Just [" 0: aaa"], Just [" 1: aa"], Just [" 2: a"], Just [" 0: aaaaaaaa"], Just [" 1: aaaaaaa"], Just [" 2: aaaaaa"], Just [" 3: aaaaa"], Just [" 4: aaaa"], Just [" 5: aaa"], Just [" 6: aa"], Just [" 7: a"]] , testRegex ".*\\.gif" [] ["borfle\\nbib.gif\\nno"] [Just [" 0: bib.gif"]] , testRegex ".{0,}\\.gif" [] ["borfle\\nbib.gif\\nno"] [Just [" 0: bib.gif"]] , testRegex ".*\\.gif" [ERROR] ["borfle\\nbib.gif\\nno"] [Just [" 0: bib.gif"]] , testRegex ".*\\.gif" [ERROR] ["borfle\\nbib.gif\\nno"] [Just [" 0: borfle\\x0abib.gif"]] , testRegex ".*\\.gif" [ERROR] ["borfle\\nbib.gif\\nno", "", "/.*$/", "borfle\\nbib.gif\\nno"] [Just [" 0: borfle\\x0abib.gif"], Just ["/.*$/"], Just [" 0: no"]] , testRegex ".*$" [ERROR] ["borfle\\nbib.gif\\nno"] [Just [" 0: borfle"]] , testRegex ".*$" [ERROR] ["borfle\\nbib.gif\\nno"] [Just [" 0: borfle\\x0abib.gif\\x0ano"]] , testRegex ".*$" [ERROR] ["borfle\\nbib.gif\\nno", "", "/.*$/", "borfle\\nbib.gif\\nno\\n"] [Just [" 0: borfle\\x0abib.gif\\x0ano"], Just [" 1: borfle\\x0abib.gif"], Just [" 2: borfle"], Just ["/.*$/"], Just [" 0: no"]] , testRegex ".*$" [ERROR] ["borfle\\nbib.gif\\nno\\n"] [Just [" 0: borfle"]] , testRegex ".*$" [ERROR] ["borfle\\nbib.gif\\nno\\n"] [Just [" 0: borfle\\x0abib.gif\\x0ano\\x0a"], Just [" 1: borfle\\x0abib.gif\\x0ano"]] , testRegex ".*$" [ERROR] ["borfle\\nbib.gif\\nno\\n", "", "/(.*X|^B)/", "abcde\\n1234Xyz", "BarFoo ", "*** Failers", "abcde\\nBar "] [Just [" 0: borfle\\x0abib.gif\\x0ano\\x0a"], Just [" 1: borfle\\x0abib.gif\\x0ano"], Just [" 2: borfle\\x0abib.gif"], Just [" 3: borfle"], Just ["/(.*X|^B)/"], Just [" 0: 1234X"], Just [" 0: B"], Nothing, Nothing] , testRegex "(.*X|^B)" [ERROR] ["abcde\\n1234Xyz", "BarFoo ", "abcde\\nBar "] [Just [" 0: 1234X"], Just [" 0: B"], Just [" 0: B"]] , testRegex "(.*X|^B)" [ERROR] ["abcde\\n1234Xyz", "BarFoo ", "*** Failers", "abcde\\nBar "] [Just [" 0: abcde\\x0a1234X"], Just [" 0: B"], Nothing, Nothing] , testRegex "(.*X|^B)" [ERROR] ["abcde\\n1234Xyz", "BarFoo ", "abcde\\nBar "] [Just [" 0: abcde\\x0a1234X"], Just [" 0: B"], Just [" 0: B"]] , testRegex "(?s)(.*X|^B)" [] ["abcde\\n1234Xyz", "BarFoo ", "*** Failers ", "abcde\\nBar "] [Just [" 0: abcde\\x0a1234X"], Just [" 0: B"], Nothing, Nothing] , testRegex "(?s:.*X|^B)" [] ["abcde\\n1234Xyz", "BarFoo ", "*** Failers ", "abcde\\nBar "] [Just [" 0: abcde\\x0a1234X"], Just [" 0: B"], Nothing, Nothing] , testRegex "^.*B" [] ["**** Failers", "abc\\nB", "", "/(?s)^.*B/", "abc\\nB"] [Nothing, Nothing, Just ["/(?s)^.*B/"], Just [" 0: abc\\x0aB"]] , testRegex "(?m)^.*B" [] ["abc\\nB", "", "/(?ms)^.*B/", "abc\\nB"] [Just [" 0: B"], Just ["/(?ms)^.*B/"], Just [" 0: abc\\x0aB"]] , testRegex "(?ms)^B" [] ["abc\\nB"] [Just [" 0: B"]] , testRegex "(?s)B$" [] ["B\\n"] [Just [" 0: B"]] , testRegex "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" [] ["123456654321", "", "/^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d/", "123456654321 "] [Just [" 0: 123456654321"], Just ["/^\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d\\d/"], Just [" 0: 123456654321"]] , testRegex "^[\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d][\\d]" [] ["123456654321", "", "/^[abc]{12}/", "abcabcabcabc", "", "/^[a-c]{12}/", "abcabcabcabc", "", "/^(a|b|c){12}/", "abcabcabcabc "] [Just [" 0: 123456654321"], Just ["/^[abc]{12}/"], Just [" 0: abcabcabcabc"], Just ["/^[a-c]{12}/"], Just [" 0: abcabcabcabc"], Just ["/^(a|b|c){12}/"], Just [" 0: abcabcabcabc"]] , testRegex "^[abcdefghijklmnopqrstuvwxy0123456789]" [] ["n", "*** Failers ", "z "] [Just [" 0: n"], Nothing, Nothing] , testRegex "abcde{0,0}" [] ["abcd", "*** Failers", "abce "] [Just [" 0: abcd"], Nothing, Nothing] , testRegex "ab[cd]{0,0}e" [] ["abe", "*** Failers", "abcde ", "", "/ab(c){0,0}d/", "abd", "*** Failers", "abcd "] [Just [" 0: abe"], Nothing, Nothing, Just ["/ab(c){0,0}d/"], Just [" 0: abd"], Nothing, Nothing] , testRegex "a(b*)" [] ["a", "ab", "abbbb", "*** Failers", "bbbbb ", "", "/ab\\d{0}e/", "abe", "*** Failers", "ab1e ", "", "/\"([^\\\\\"]+|\\\\.)*\"/", "the \\\"quick\\\" brown fox", "\\\"the \\\\\\\"quick\\\\\\\" brown fox\\\" "] [Just [" 0: a"], Just [" 0: ab"], Just [" 1: a"], Just [" 0: abbbb"], Just [" 1: abbb"], Just [" 2: abb"], Just [" 3: ab"], Just [" 4: a"], Just [" 0: a"], Nothing, Just ["/ab\\d{0}e/"], Just [" 0: abe"], Nothing, Nothing, Just ["/\"([^\\\\\"]+|\\\\.)*\"/"], Just [" 0: \"quick\""], Just [" 0: \"the \\\"quick\\\" brown fox\""]] , testRegex ".*?" [ERROR] ["abc", "", "/\\b/g+", "abc "] [Just [" 0: abc"], Just [" 0+ "], Just [" 1: ab"], Just [" 2: a"], Just [" 3: "], Just [" 0: "], Just [" 0+ "], Just ["/\\b/g+"], Just [" 0: "], Just [" 0+ abc"], Just [" 0: "], Just [" 0+ "]] , testRegex "\\b" [ERROR] ["abc "] [Just [" 0: "], Just [" 0+ abc"], Just [" 0: "], Just [" 0+ "]] , testRegex "" [ERROR] ["abc"] [Just [" 0: "], Just [" 0: "], Just [" 0: "], Just [" 0: "]] , testRegex "]{0,})>]{0,})>([\\d]{0,}\\.)(.*)((
([\\w\\W\\s\\d][^<>]{0,})|[\\s]{0,}))<\\/a><\\/TD>]{0,})>([\\w\\W\\s\\d][^<>]{0,})<\\/TD>]{0,})>([\\w\\W\\s\\d][^<>]{0,})<\\/TD><\\/TR>" [ERROR] ["43.Word Processor
(N-1286)
Lega lstaff.comCA - Statewide"] [Just [" 0: 43.Word Processor
(N-1286)
Lega lstaff.comCA - Statewide"]] , testRegex "a[^a]b" [] ["acb", "a\\nb", "", "/a.b/", "acb", "*** Failers ", "a\\nb ", "", "/a[^a]b/s", "acb", "a\\nb ", "", "/a.b/s", "acb", "a\\nb "] [Just [" 0: acb"], Just [" 0: a\\x0ab"], Just ["/a.b/"], Just [" 0: acb"], Nothing, Nothing, Just ["/a[^a]b/s"], Just [" 0: acb"], Just [" 0: a\\x0ab"], Just ["/a.b/s"], Just [" 0: acb"], Just [" 0: a\\x0ab"]] , testRegex "^(b+?|a){1,2}?c" [] ["bac", "bbac", "bbbac", "bbbbac", "bbbbbac "] [Just [" 0: bac"], Just [" 0: bbac"], Just [" 0: bbbac"], Just [" 0: bbbbac"], Just [" 0: bbbbbac"]] , testRegex "^(b+|a){1,2}?c" [] ["bac", "bbac", "bbbac", "bbbbac", "bbbbbac ", "", "/(?!\\A)x/m", "x\\nb\\n", "a\\bx\\n ", "", "/\\x0{ab}/", "\\0{ab} "] [Just [" 0: bac"], Just [" 0: bbac"], Just [" 0: bbbac"], Just [" 0: bbbbac"], Just [" 0: bbbbbac"], Just ["/(?!\\A)x/m"], Nothing, Just [" 0: x"], Just ["/\\x0{ab}/"], Just [" 0: \\x00{ab}"]] , testRegex "(A|B)*?CD" [] ["CD ", "", "/(A|B)*CD/", "CD "] [Just [" 0: CD"], Just ["/(A|B)*CD/"], Just [" 0: CD"]] , testRegex "(?.*/)foo" [ERROR] ["/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/"] [Nothing] , testRegex "(?>.*/)foo" [ERROR] ["/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo"] [Just [" 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo"]] , testRegex "(?>(\\.\\d\\d[1-9]?))\\d+" [] ["1.230003938", "1.875000282", "*** Failers ", "1.235 "] [Just [" 0: .230003938"], Just [" 1: .23000393"], Just [" 2: .2300039"], Just [" 3: .230003"], Just [" 4: .23000"], Just [" 5: .2300"], Just [" 6: .230"], Just [" 0: .875000282"], Just [" 1: .87500028"], Just [" 2: .8750002"], Just [" 3: .875000"], Just [" 4: .87500"], Just [" 5: .8750"], Nothing, Nothing] , testRegex "^((?>\\w+)|(?>\\s+))*$" [] ["now is the time for all good men to come to the aid of the party", "*** Failers", "this is not a line with only words and spaces!", "", "/(\\d+)(\\w)/", "12345a", "12345+ "] [Just [" 0: now is the time for all good men to come to the aid of the party"], Nothing, Nothing, Just ["/(\\d+)(\\w)/"], Just [" 0: 12345a"], Just [" 1: 12345"], Just [" 2: 1234"], Just [" 3: 123"], Just [" 4: 12"], Just [" 0: 12345"], Just [" 1: 1234"], Just [" 2: 123"], Just [" 3: 12"]] , testRegex "((?>\\d+))(\\w)" [] ["12345a", "*** Failers", "12345+ "] [Just [" 0: 12345a"], Nothing, Nothing] , testRegex "(?>a+)b" [] ["aaab"] [Just [" 0: aaab"]] , testRegex "((?>a+)b)" [] ["aaab"] [Just [" 0: aaab"]] , testRegex "(?>(a+))b" [] ["aaab"] [Just [" 0: aaab"]] , testRegex "(?>b)+" [] ["aaabbbccc"] [Just [" 0: bbb"], Just [" 1: bb"], Just [" 2: b"]] , testRegex "(?>a+|b+|c+)*c" [] ["aaabbbbccccd", "", "/(a+|b+|c+)*c/", "aaabbbbccccd"] [Just [" 0: aaabbbbcccc"], Just [" 1: aaabbbbc"], Just ["/(a+|b+|c+)*c/"], Just [" 0: aaabbbbcccc"], Just [" 1: aaabbbbccc"], Just [" 2: aaabbbbcc"], Just [" 3: aaabbbbc"]] , testRegex "((?>[^()]+)|\\([^()]*\\))+" [] ["((abc(ade)ufh()()x", "", "/\\(((?>[^()]+)|\\([^()]+\\))+\\)/ ", "(abc)", "(abc(def)xyz)", "*** Failers", "((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "] [Just [" 0: abc(ade)ufh()()x"], Just [" 1: abc(ade)ufh()()"], Just [" 2: abc(ade)ufh()"], Just [" 3: abc(ade)ufh"], Just [" 4: abc(ade)"], Just [" 5: abc"], Just ["/\\(((?>[^()]+)|\\([^()]+\\))+\\)/ "], Just [" 0: (abc)"], Just [" 0: (abc(def)xyz)"], Nothing, Nothing] , testRegex "a(?-i)b" [caseless] ["ab", "Ab", "*** Failers ", "aB", "AB", "", "/(a (?x)b c)d e/", "a bcd e", "*** Failers", "a b cd e", "abcd e ", "a bcde ", "", "/(a b(?x)c d (?-x)e f)/", "a bcde f", "*** Failers", "abcdef "] [Just [" 0: ab"], Just [" 0: Ab"], Nothing, Nothing, Nothing, Just ["/(a (?x)b c)d e/"], Just [" 0: a bcd e"], Nothing, Nothing, Nothing, Nothing, Just ["/(a b(?x)c d (?-x)e f)/"], Just [" 0: a bcde f"], Nothing, Nothing] , testRegex "(a(?i)b)c" [] ["abc", "aBc", "*** Failers", "abC", "aBC ", "Abc", "ABc", "ABC", "AbC", "", "/a(?i:b)c/", "abc", "aBc", "*** Failers ", "ABC", "abC", "aBC", "", "/a(?i:b)*c/", "aBc", "aBBc", "*** Failers ", "aBC", "aBBC", "", "/a(?=b(?i)c)\\w\\wd/", "abcd", "abCd", "*** Failers", "aBCd", "abcD ", "", "/(?s-i:more.*than).*million/i", "more than million", "more than MILLION", "more \\n than Million ", "*** Failers", "MORE THAN MILLION ", "more \\n than \\n million "] [Just [" 0: abc"], Just [" 0: aBc"], Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Just ["/a(?i:b)c/"], Just [" 0: abc"], Just [" 0: aBc"], Nothing, Nothing, Nothing, Nothing, Just ["/a(?i:b)*c/"], Just [" 0: aBc"], Just [" 0: aBBc"], Nothing, Nothing, Nothing, Just ["/a(?=b(?i)c)\\w\\wd/"], Just [" 0: abcd"], Just [" 0: abCd"], Nothing, Nothing, Nothing, Just ["/(?s-i:more.*than).*million/i"], Just [" 0: more than million"], Just [" 0: more than MILLION"], Just [" 0: more \\x0a than Million"], Nothing, Nothing, Nothing] , testRegex "(?:(?s-i)more.*than).*million" [caseless] ["more than million", "more than MILLION", "more \\n than Million ", "*** Failers", "MORE THAN MILLION ", "more \\n than \\n million ", "", "/(?>a(?i)b+)+c/ ", "abc", "aBbc", "aBBc ", "*** Failers", "Abc", "abAb ", "abbC ", "", "/(?=a(?i)b)\\w\\wc/", "abc", "aBc", "*** Failers", "Ab ", "abC", "aBC ", "", "/(?<=a(?i)b)(\\w\\w)c/", "abxxc", "aBxxc", "*** Failers", "Abxxc", "ABxxc", "abxxC "] [Just [" 0: more than million"], Just [" 0: more than MILLION"], Just [" 0: more \\x0a than Million"], Nothing, Nothing, Nothing, Just ["/(?>a(?i)b+)+c/ "], Just [" 0: abc"], Just [" 0: aBbc"], Just [" 0: aBBc"], Nothing, Nothing, Nothing, Nothing, Just ["/(?=a(?i)b)\\w\\wc/"], Just [" 0: abc"], Just [" 0: aBc"], Nothing, Nothing, Nothing, Nothing, Just ["/(?<=a(?i)b)(\\w\\w)c/"], Just [" 0: xxc"], Just [" 0: xxc"], Nothing, Nothing, Nothing, Nothing] , testRegex "^(?(?=abc)\\w{3}:|\\d\\d)$" [] ["abc:", "12", "*** Failers", "123", "xyz "] [Just [" 0: abc:"], Just [" 0: 12"], Nothing, Nothing, Nothing] , testRegex "^(?(?!abc)\\d\\d|\\w{3}:)$" [] ["abc:", "12", "*** Failers", "123", "xyz ", "", "/(?(?<=foo)bar|cat)/", "foobar", "cat", "fcat", "focat ", "*** Failers", "foocat "] [Just [" 0: abc:"], Just [" 0: 12"], Nothing, Nothing, Nothing, Just ["/(?(?<=foo)bar|cat)/"], Just [" 0: bar"], Just [" 0: cat"], Just [" 0: cat"], Just [" 0: cat"], Nothing, Nothing] , testRegex "(?(?a*)*" [] ["a", "aa", "aaaa", "", "/(abc|)+/", "abc", "abcabc", "abcabcabc", "xyz "] [Just [" 0: a"], Just [" 1: "], Just [" 0: aa"], Just [" 1: "], Just [" 0: aaaa"], Just [" 1: "], Just ["/(abc|)+/"], Just [" 0: abc"], Just [" 1: "], Just [" 0: abcabc"], Just [" 1: abc"], Just [" 2: "], Just [" 0: abcabcabc"], Just [" 1: abcabc"], Just [" 2: abc"], Just [" 3: "], Just [" 0: "]] , testRegex "([a]*)*" [] ["a", "aaaaa ", "", "/([ab]*)*/", "a", "b", "ababab", "aaaabcde", "bbbb ", "", "/([^a]*)*/", "b", "bbbb", "aaa ", "", "/([^ab]*)*/", "cccc", "abab ", "", "/([a]*?)*/", "a", "aaaa ", "", "/([ab]*?)*/", "a", "b", "abab", "baba ", "", "/([^a]*?)*/", "b", "bbbb", "aaa ", "", "/([^ab]*?)*/", "c", "cccc", "baba ", "", "/(?>a*)*/", "a", "aaabcde ", "", "/((?>a*))*/", "aaaaa", "aabbaa ", "", "/((?>a*?))*/", "aaaaa", "aabbaa "] [Just [" 0: a"], Just [" 1: "], Just [" 0: aaaaa"], Just [" 1: aaaa"], Just [" 2: aaa"], Just [" 3: aa"], Just [" 4: a"], Just [" 5: "], Just ["/([ab]*)*/"], Just [" 0: a"], Just [" 1: "], Just [" 0: b"], Just [" 1: "], Just [" 0: ababab"], Just [" 1: ababa"], Just [" 2: abab"], Just [" 3: aba"], Just [" 4: ab"], Just [" 5: a"], Just [" 6: "], Just [" 0: aaaab"], Just [" 1: aaaa"], Just [" 2: aaa"], Just [" 3: aa"], Just [" 4: a"], Just [" 5: "], Just [" 0: bbbb"], Just [" 1: bbb"], Just [" 2: bb"], Just [" 3: b"], Just [" 4: "], Just ["/([^a]*)*/"], Just [" 0: b"], Just [" 1: "], Just [" 0: bbbb"], Just [" 1: bbb"], Just [" 2: bb"], Just [" 3: b"], Just [" 4: "], Just [" 0: "], Just ["/([^ab]*)*/"], Just [" 0: cccc"], Just [" 1: ccc"], Just [" 2: cc"], Just [" 3: c"], Just [" 4: "], Just [" 0: "], Just ["/([a]*?)*/"], Just [" 0: a"], Just [" 1: "], Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"], Just [" 4: "], Just ["/([ab]*?)*/"], Just [" 0: a"], Just [" 1: "], Just [" 0: b"], Just [" 1: "], Just [" 0: abab"], Just [" 1: aba"], Just [" 2: ab"], Just [" 3: a"], Just [" 4: "], Just [" 0: baba"], Just [" 1: bab"], Just [" 2: ba"], Just [" 3: b"], Just [" 4: "], Just ["/([^a]*?)*/"], Just [" 0: b"], Just [" 1: "], Just [" 0: bbbb"], Just [" 1: bbb"], Just [" 2: bb"], Just [" 3: b"], Just [" 4: "], Just [" 0: "], Just ["/([^ab]*?)*/"], Just [" 0: c"], Just [" 1: "], Just [" 0: cccc"], Just [" 1: ccc"], Just [" 2: cc"], Just [" 3: c"], Just [" 4: "], Just [" 0: "], Just ["/(?>a*)*/"], Just [" 0: a"], Just [" 1: "], Just [" 0: aaa"], Just [" 1: "], Just ["/((?>a*))*/"], Just [" 0: aaaaa"], Just [" 1: "], Just [" 0: aa"], Just [" 1: "], Just ["/((?>a*?))*/"], Just [" 0: aaaaa"], Just [" 1: "], Just [" 0: aa"], Just [" 1: "]] , testRegex "(?(?=[^a-z]+[a-z]) \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} ) " [ERROR] ["12-sep-98", "12-09-98", "*** Failers", "sep-12-98", "", "/(?i:saturday|sunday)/", "saturday", "sunday", "Saturday", "Sunday", "SATURDAY", "SUNDAY", "SunDay", "", "/(a(?i)bc|BB)x/", "abcx", "aBCx", "bbx", "BBx", "*** Failers", "abcX", "aBCX", "bbX", "BBX "] [Just [" 0: 12-sep-98"], Just [" 0: 12-09-98"], Nothing, Nothing, Just ["/(?i:saturday|sunday)/"], Just [" 0: saturday"], Just [" 0: sunday"], Just [" 0: Saturday"], Just [" 0: Sunday"], Just [" 0: SATURDAY"], Just [" 0: SUNDAY"], Just [" 0: SunDay"], Just ["/(a(?i)bc|BB)x/"], Just [" 0: abcx"], Just [" 0: aBCx"], Just [" 0: bbx"], Just [" 0: BBx"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^([ab](?i)[cd]|[ef])" [] ["ac", "aC", "bD", "elephant", "Europe ", "frog", "France", "*** Failers", "Africa "] [Just [" 0: ac"], Just [" 0: aC"], Just [" 0: bD"], Just [" 0: e"], Just [" 0: E"], Just [" 0: f"], Just [" 0: F"], Nothing, Nothing] , testRegex "^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)" [] ["ab", "aBd", "xy", "xY", "zebra", "Zambesi", "*** Failers", "aCD ", "XY "] [Just [" 0: ab"], Just [" 0: aBd"], Just [" 0: xy"], Just [" 0: xY"], Just [" 0: z"], Just [" 0: Z"], Nothing, Nothing, Nothing] , testRegex "(?<=foo\\n)^bar" [ERROR] ["foo\\nbar", "*** Failers", "bar", "baz\\nbar "] [Just [" 0: bar"], Nothing, Nothing, Nothing] , testRegex "(?<=(?]&" [] ["<&OUT"] [Just [" 0: <&"]] , testRegex "(?:(f)(o)(o)|(b)(a)(r))*" [] ["foobar"] [Just [" 0: foobar"], Just [" 1: foo"], Just [" 2: "]] , testRegex "(?<=a)b" [] ["ab", "*** Failers", "cb", "b"] [Just [" 0: b"], Nothing, Nothing, Nothing] , testRegex "(?a+)ab" [] [] [] , testRegex "(?>a+)b" [] ["aaab"] [Just [" 0: aaab"]] , testRegex "([[:]+)" [] ["a:[b]:"] [Just [" 0: :["], Just [" 1: :"]] , testRegex "([[=]+)" [] ["a=[b]="] [Just [" 0: =["], Just [" 1: ="]] , testRegex "([[.]+)" [] ["a.[b]."] [Just [" 0: .["], Just [" 1: ."]] , testRegex "((?>a+)b)" [] ["aaab"] [Just [" 0: aaab"]] , testRegex "(?>(a+))b" [] ["aaab"] [Just [" 0: aaab"]] , testRegex "((?>[^()]+)|\\([^()]*\\))+" [] ["((abc(ade)ufh()()x"] [Just [" 0: abc(ade)ufh()()x"], Just [" 1: abc(ade)ufh()()"], Just [" 2: abc(ade)ufh()"], Just [" 3: abc(ade)ufh"], Just [" 4: abc(ade)"], Just [" 5: abc"]] , testRegex "a\\Z" [] ["*** Failers", "aaab", "a\\nb\\n"] [Nothing, Nothing, Nothing] , testRegex "b\\Z" [] ["a\\nb\\n"] [Just [" 0: b"]] , testRegex "b\\z" [] [] [] , testRegex "b\\Z" [] ["a\\nb"] [Just [" 0: b"]] , testRegex "b\\z" [] ["a\\nb", "*** Failers", "", "/(?>.*)(?<=(abcd|wxyz))/", "alphabetabcd", "endingwxyz", "*** Failers", "a rather long string that doesn't end with one of them"] [Just [" 0: b"], Nothing, Just ["/(?>.*)(?<=(abcd|wxyz))/"], Just [" 0: alphabetabcd"], Just [" 0: endingwxyz"], Nothing, Nothing] , testRegex "word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword" [] ["word cat dog elephant mussel cow horse canary baboon snake shark otherword", "word cat dog elephant mussel cow horse canary baboon snake shark", "", "/word (?>[a-zA-Z0-9]+ ){0,30}otherword/", "word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope"] [Just [" 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword"], Nothing, Just ["/word (?>[a-zA-Z0-9]+ ){0,30}otherword/"], Nothing] , testRegex "(?<=\\d{3}(?!999))foo" [] ["999foo", "123999foo ", "*** Failers", "123abcfoo", "", "/(?<=(?!...999)\\d{3})foo/", "999foo", "123999foo ", "*** Failers", "123abcfoo"] [Just [" 0: foo"], Just [" 0: foo"], Nothing, Nothing, Just ["/(?<=(?!...999)\\d{3})foo/"], Just [" 0: foo"], Just [" 0: foo"], Nothing, Nothing] , testRegex "(?<=\\d{3}(?!999)...)foo" [] ["123abcfoo", "123456foo ", "*** Failers", "123999foo ", "", "/(?<=\\d{3}...)(?Z)+|A)*" [] ["ZABCDEFG"] [Just [" 0: ZA"], Just [" 1: Z"], Just [" 2: "]] , testRegex "((?>)+|A)*" [] ["ZABCDEFG"] [Just [" 0: "]] , testRegex "a*" [ERROR] ["abbab"] [Just [" 0: a"], Just [" 1: "], Just [" 0: "], Just [" 0: "], Just [" 0: a"], Just [" 1: "], Just [" 0: "], Just [" 0: "]] , testRegex "^[a-\\d]" [] ["abcde", "-things", "0digit", "*** Failers", "bcdef "] [Just [" 0: a"], Just [" 0: -"], Just [" 0: 0"], Nothing, Nothing] , testRegex "^[\\d-a]" [] ["abcde", "-things", "0digit", "*** Failers", "bcdef ", "", "/[[:space:]]+/", "> \\x09\\x0a\\x0c\\x0d\\x0b<", "", "/[[:blank:]]+/", "> \\x09\\x0a\\x0c\\x0d\\x0b<", "", "/[\\s]+/", "> \\x09\\x0a\\x0c\\x0d\\x0b<", "", "/\\s+/", "> \\x09\\x0a\\x0c\\x0d\\x0b<", "", "/a\vb/x", "ab"] [Just [" 0: a"], Just [" 0: -"], Just [" 0: 0"], Nothing, Nothing, Just ["/[[:space:]]+/"], Just [" 0: \\x09\\x0a\\x0c\\x0d\\x0b"], Just [" 1: \\x09\\x0a\\x0c\\x0d"], Just [" 2: \\x09\\x0a\\x0c"], Just [" 3: \\x09\\x0a"], Just [" 4: \\x09"], Just [" 5: "], Just ["/[[:blank:]]+/"], Just [" 0: \\x09"], Just [" 1: "], Just ["/[\\s]+/"], Just [" 0: \\x09\\x0a\\x0c\\x0d"], Just [" 1: \\x09\\x0a\\x0c"], Just [" 2: \\x09\\x0a"], Just [" 3: \\x09"], Just [" 4: "], Just ["/\\s+/"], Just [" 0: \\x09\\x0a\\x0c\\x0d"], Just [" 1: \\x09\\x0a\\x0c"], Just [" 2: \\x09\\x0a"], Just [" 3: \\x09"], Just [" 4: "], Just ["/a\vb/x"], Nothing] , testRegex "(?!\\A)x" [ERROR] ["a\\nxb\\n"] [Just [" 0: x"]] , testRegex "(?!^)x" [ERROR] ["a\\nxb\\n"] [Nothing] , testRegex "abc\\Qabc\\Eabc" [] ["abcabcabc", "", "/abc\\Q(*+|\\Eabc/", "abc(*+|abc "] [Just [" 0: abcabcabc"], Just ["/abc\\Q(*+|\\Eabc/"], Just [" 0: abc(*+|abc"]] , testRegex " abc\\Q abc\\Eabc" [ERROR] ["abc abcabc", "*** Failers", "abcabcabc ", "", "/abc#comment", "\\Q#not comment", "literal\\E/x", "abc#not comment\\n literal "] [Just [" 0: abc abcabc"], Nothing, Nothing, Just ["/abc#comment"], Just [" 0: abc#not comment\\x0a literal"]] , testRegex "ERROR" [] ["\\Q#not comment", "literal/x", "abc#not comment\\n literal "] [Just [" 0: abc#not comment\\x0a literal"]] , testRegex "ERROR" [] ["\\Q#not comment", "literal\\E #more comment", "/x", "abc#not comment\\n literal "] [Just [" 0: abc#not comment\\x0a literal"]] , testRegex "ERROR" [] ["\\Q#not comment", "literal\\E #more comment/x", "abc#not comment\\n literal "] [Just [" 0: abc#not comment\\x0a literal"]] , testRegex "\\Qabc\\$xyz\\E" [] ["abc\\\\\\$xyz"] [Just [" 0: abc\\$xyz"]] , testRegex "\\Qabc\\E\\$\\Qxyz\\E" [] ["abc\\$xyz"] [Just [" 0: abc$xyz"]] , testRegex "\\Gabc" [] ["abc", "*** Failers", "xyzabc "] [Just [" 0: abc"], Nothing, Nothing] , testRegex "\\Gabc." [ERROR] ["abc1abc2xyzabc3"] [Just [" 0: abc1"], Just [" 0: abc2"]] , testRegex "abc." [ERROR] ["abc1abc2xyzabc3 "] [Just [" 0: abc1"], Just [" 0: abc2"], Just [" 0: abc3"]] , testRegex "a(?x: b c )d" [] ["XabcdY", "*** Failers ", "Xa b c d Y "] [Just [" 0: abcd"], Nothing, Nothing] , testRegex "((?x)x y z | a b c)" [] ["XabcY", "AxyzB "] [Just [" 0: abc"], Just [" 0: xyz"]] , testRegex "(?i)AB(?-i)C" [] ["XabCY", "*** Failers", "XabcY "] [Just [" 0: abC"], Nothing, Nothing] , testRegex "((?i)AB(?-i)C|D)E" [] ["abCE", "DE", "*** Failers", "abcE", "abCe ", "dE", "De "] [Just [" 0: abCE"], Just [" 0: DE"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "[z\\Qa-d]\\E]" [] ["z", "a", "-", "d", "] ", "*** Failers", "b "] [Just [" 0: z"], Just [" 0: a"], Just [" 0: -"], Just [" 0: d"], Just [" 0: ]"], Just [" 0: a"], Nothing] , testRegex "[\\z\\C]" [] ["z", "C ", "", "/\\M/", "M ", "", "/(a+)*b/", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ", "", "/(?i)reg(?:ul(?:[a\228]|ae)r|ex)/", "REGular", "regulaer", "Regex ", "regul\228r "] [Just [" 0: z"], Just [" 0: C"], Just ["/\\M/"], Just [" 0: M"], Just ["/(a+)*b/"], Nothing, Just ["/(?i)reg(?:ul(?:[a\228]|ae)r|ex)/"], Just [" 0: REGular"], Just [" 0: regulaer"], Just [" 0: Regex"], Just [" 0: regul\\xe4r"]] , testRegex "\197\230\229\228[\224-\255\192-\223]+" [] ["\197\230\229\228\224", "\197\230\229\228\255", "\197\230\229\228\192", "\197\230\229\228\223"] [Just [" 0: \\xc5\\xe6\\xe5\\xe4\\xe0"], Just [" 0: \\xc5\\xe6\\xe5\\xe4\\xff"], Just [" 0: \\xc5\\xe6\\xe5\\xe4\\xc0"], Just [" 0: \\xc5\\xe6\\xe5\\xe4\\xdf"]] , testRegex "(?<=Z)X." [] ["\\x84XAZXB"] [Just [" 0: XB"]] , testRegex "^(?(2)a|(1)(2))+$" [] ["123a"] [Just ["Error -17"]] , testRegex "(?<=a|bbbb)c" [] ["ac", "bbbbc"] [Just [" 0: c"], Just [" 0: c"]] , testRegex "abc" [ERROR] ["testsavedregex", "testsavedregex"], Just ["Compiled regex written to testsavedregex"], Just ["testsavedregex", "testsavedregex"], Just ["Compiled regex written to testsavedregex"], Just ["Study data written to testsavedregex"], Just ["", "xyz\\r\\nabc\\", "xyz\\rabc\\", "xyz\\r\\nabc\\", "** Failers ", "xyz\\nabc\\", "xyz\\r\\nabc\\", "xyz\\nabc\\", "xyz\\rabc\\", "xyz\\rabc\\", "", "/abc$/m", "xyzabc", "xyzabc\\n ", "xyzabc\\npqr ", "xyzabc\\r\\ ", "xyzabc\\rpqr\\ ", "xyzabc\\r\\n\\ ", "xyzabc\\r\\npqr\\ ", "** Failers", "xyzabc\\r ", "xyzabc\\rpqr ", "xyzabc\\r\\n ", "xyzabc\\r\\npqr ", "", "/^abc/m", "xyz\\rabcdef", "xyz\\nabcdef\\", "** Failers ", "xyz\\nabcdef", "", "/^abc/m", "xyz\\nabcdef", "xyz\\rabcdef\\", "** Failers ", "xyz\\rabcdef", "", "/^abc/m", "xyz\\r\\nabcdef", "xyz\\rabcdef\\", "** Failers ", "xyz\\rabcdef", "", "/.*/", "abc\\ndef", "abc\\rdef", "abc\\r\\ndef", "\\abc\\ndef", "\\abc\\rdef", "\\abc\\r\\ndef", "\\abc\\ndef", "\\abc\\rdef", "\\abc\\r\\ndef"] [Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Just ["/abc$/m"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Nothing, Nothing, Nothing, Just ["/^abc/m"], Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Just ["/^abc/m"], Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Just ["/^abc/m"], Just [" 0: abc"], Just [" 0: abc"], Nothing, Nothing, Just ["/.*/"], Just [" 0: abc"], Just [" 1: ab"], Just [" 2: a"], Just [" 3: "], Just [" 0: abc\\x0ddef"], Just [" 1: abc\\x0dde"], Just [" 2: abc\\x0dd"], Just [" 3: abc\\x0d"], Just [" 4: abc"], Just [" 5: ab"], Just [" 6: a"], Just [" 7: "], Just [" 0: abc\\x0d"], Just [" 1: abc"], Just [" 2: ab"], Just [" 3: a"], Just [" 4: "], Just [" 0: abc\\x0adef"], Just [" 1: abc\\x0ade"], Just [" 2: abc\\x0ad"], Just [" 3: abc\\x0a"], Just [" 4: abc"], Just [" 5: ab"], Just [" 6: a"], Just [" 7: "], Just [" 0: abc"], Just [" 1: ab"], Just [" 2: a"], Just [" 3: "], Just [" 0: abc"], Just [" 1: ab"], Just [" 2: a"], Just [" 3: "], Just [" 0: abc\\x0adef"], Just [" 1: abc\\x0ade"], Just [" 2: abc\\x0ad"], Just [" 3: abc\\x0a"], Just [" 4: abc"], Just [" 5: ab"], Just [" 6: a"], Just [" 7: "], Just [" 0: abc\\x0ddef"], Just [" 1: abc\\x0dde"], Just [" 2: abc\\x0dd"], Just [" 3: abc\\x0d"], Just [" 4: abc"], Just [" 5: ab"], Just [" 6: a"], Just [" 7: "], Just [" 0: abc"], Just [" 1: ab"], Just [" 2: a"], Just [" 3: "]] , testRegex "\\w+(.)(.)?def" [ERROR] ["abc\\ndef", "abc\\rdef", "abc\\r\\ndef"] [Just [" 0: abc\\x0adef"], Just [" 0: abc\\x0ddef"], Just [" 0: abc\\x0d\\x0adef"]] , testRegex "^\\w+=.*(\\\\\\n.*)*" [] ["abc=xyz\\\\\\npqr"] [Just [" 0: abc=xyz\\\\x0apqr"], Just [" 1: abc=xyz\\\\x0apq"], Just [" 2: abc=xyz\\\\x0ap"], Just [" 3: abc=xyz\\\\x0a"], Just [" 4: abc=xyz\\"], Just [" 5: abc=xyz"], Just [" 6: abc=xy"], Just [" 7: abc=x"], Just [" 8: abc="]] , testRegex "^(a()*)*" [] ["aaaa"] [Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"], Just [" 4: "]] , testRegex "^(?:a(?:(?:))*)*" [] ["aaaa"] [Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"], Just [" 4: "]] , testRegex "^(a()+)+" [] ["aaaa"] [Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"]] , testRegex "^(?:a(?:(?:))+)+" [] ["aaaa"] [Just [" 0: aaaa"], Just [" 1: aaa"], Just [" 2: aa"], Just [" 3: a"]] , testRegex "(a|)*\\d" [] ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4"] [Nothing, Just [" 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4"]] , testRegex "(?>a|)*\\d" [] ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4"] [Nothing, Just [" 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4"]] , testRegex "(?:a|)*\\d" [] ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4"] [Nothing, Just [" 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4"]] , testRegex "^a.b" [ERROR] ["a\\rb", "a\\nb\\ ", "** Failers", "a\\nb", "a\\nb\\", "a\\rb\\ ", "a\\rb\\ "] [Just [" 0: a\\x0db"], Just [" 0: a\\x0ab"], Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex "^abc." [ERROR] ["abc1 \\x0aabc2 \\x0babc3xx \\x0cabc4 \\x0dabc5xx \\x0d\\x0aabc6 \\x85abc7 \\x{2028}abc8 \\x{2029}abc9 JUNK"] [Just [" 0: abc1"], Just [" 0: abc2"], Just [" 0: abc3"], Just [" 0: abc4"], Just [" 0: abc5"], Just [" 0: abc6"], Just [" 0: abc7"]] , testRegex "abc.$" [ERROR] ["abc1\\x0a abc2\\x0b abc3\\x0c abc4\\x0d abc5\\x0d\\x0a abc6\\x85 abc7\\x{2028} abc8\\x{2029} abc9"] [Just [" 0: abc1"], Just [" 0: abc2"], Just [" 0: abc3"], Just [" 0: abc4"], Just [" 0: abc5"], Just [" 0: abc6"], Just [" 0: abc9"]] , testRegex "^a\\Rb" [ERROR] ["a\\nb", "a\\rb", "a\\r\\nb", "a\\x0bb", "a\\x0cb", "a\\x85b ", "** Failers", "a\\n\\rb "] [Just [" 0: a\\x0ab"], Just [" 0: a\\x0db"], Just [" 0: a\\x0d\\x0ab"], Just [" 0: a\\x0bb"], Just [" 0: a\\x0cb"], Just [" 0: a\\x85b"], Nothing, Nothing] , testRegex "^a\\R*b" [ERROR] ["ab", "a\\nb", "a\\rb", "a\\r\\nb", "a\\x0bb", "a\\x0cb", "a\\x85b ", "a\\n\\rb ", "a\\n\\r\\x85\\x0cb "] [Just [" 0: ab"], Just [" 0: a\\x0ab"], Just [" 0: a\\x0db"], Just [" 0: a\\x0d\\x0ab"], Just [" 0: a\\x0bb"], Just [" 0: a\\x0cb"], Just [" 0: a\\x85b"], Just [" 0: a\\x0a\\x0db"], Just [" 0: a\\x0a\\x0d\\x85\\x0cb"]] , testRegex "^a\\R+b" [ERROR] ["a\\nb", "a\\rb", "a\\r\\nb", "a\\x0bb", "a\\x0cb", "a\\x85b ", "a\\n\\rb ", "a\\n\\r\\x85\\x0cb ", "** Failers", "ab ", "", "/^a\\R{1,3}b/", "a\\nb", "a\\n\\rb", "a\\n\\r\\x85b", "a\\r\\n\\r\\nb ", "a\\r\\n\\r\\n\\r\\nb ", "a\\n\\r\\n\\rb", "a\\n\\n\\r\\nb ", "** Failers", "a\\n\\n\\n\\rb", "a\\r"] [Just [" 0: a\\x0ab"], Just [" 0: a\\x0db"], Just [" 0: a\\x0d\\x0ab"], Just [" 0: a\\x0bb"], Just [" 0: a\\x0cb"], Just [" 0: a\\x85b"], Just [" 0: a\\x0a\\x0db"], Just [" 0: a\\x0a\\x0d\\x85\\x0cb"], Nothing, Nothing, Just ["/^a\\R{1,3}b/"], Just [" 0: a\\x0ab"], Just [" 0: a\\x0a\\x0db"], Just [" 0: a\\x0a\\x0d\\x85b"], Just [" 0: a\\x0d\\x0a\\x0d\\x0ab"], Just [" 0: a\\x0d\\x0a\\x0d\\x0a\\x0d\\x0ab"], Just [" 0: a\\x0a\\x0d\\x0a\\x0db"], Just [" 0: a\\x0a\\x0a\\x0d\\x0ab"], Nothing, Nothing, Nothing] , testRegex "^a[\\R]b" [ERROR] ["aRb", "** Failers", "a\\nb "] [Just [" 0: aRb"], Nothing, Nothing] , testRegex ".+foo" [] ["afoo", "** Failers ", "\\r\\nfoo ", "\\nfoo "] [Just [" 0: afoo"], Nothing, Nothing, Nothing] , testRegex ".+foo" [ERROR] ["afoo", "\\nfoo ", "** Failers ", "\\r\\nfoo "] [Just [" 0: afoo"], Just [" 0: \\x0afoo"], Nothing, Nothing] , testRegex ".+foo" [ERROR] ["afoo", "** Failers ", "\\nfoo ", "\\r\\nfoo "] [Just [" 0: afoo"], Nothing, Nothing, Nothing] , testRegex ".+foo" [ERROR] ["afoo", "\\r\\nfoo ", "\\nfoo "] [Just [" 0: afoo"], Just [" 0: \\x0d\\x0afoo"], Just [" 0: \\x0afoo"]] , testRegex "^$" [ERROR] ["abc\\r\\rxyz", "abc\\n\\rxyz ", "** Failers ", "abc\\r\\nxyz"] [Just [" 0: "], Just [" 0: "], Nothing, Nothing] , testRegex "^X" [ERROR] ["XABC", "** Failers ", "XABC\\B"] [Just [" 0: X"], Nothing, Nothing] , testRegex "(?m)^$" [ERROR] ["abc\\r\\n\\r\\n"] [Just [" 0: "], Just [" 0+ \\x0d\\x0a"]] , testRegex "(?m)^$|^\\r\\n" [ERROR] ["abc\\r\\n\\r\\n", "", "/(?m)$/g+ ", "abc\\r\\n\\r\\n"] [Just [" 0: \\x0d\\x0a"], Just [" 0+ "], Just [" 1: "], Just ["/(?m)$/g+ "], Just [" 0: "], Just [" 0+ \\x0d\\x0a\\x0d\\x0a"], Just [" 0: "], Just [" 0+ \\x0d\\x0a"], Just [" 0: "], Just [" 0+ "]] , testRegex "(?|(abc)|(xyz))" [] [">abc<", ">xyz< "] [Just [" 0: abc"], Just [" 0: xyz"]] , testRegex "(x)(?|(abc)|(xyz))(x)" [] ["xabcx", "xxyzx "] [Just [" 0: xabcx"], Just [" 0: xxyzx"]] , testRegex "(x)(?|(abc)(pqr)|(xyz))(x)" [] ["xabcpqrx", "xxyzx "] [Just [" 0: xabcpqrx"], Just [" 0: xxyzx"]] , testRegex "(?|(abc)|(xyz))(?1)" [] ["abcabc", "xyzabc ", "** Failers ", "xyzxyz ", "", "/\\H\\h\\V\\v/", "X X\\x0a", "X\\x09X\\x0b", "** Failers", "\\xa0 X\\x0a ", "", "/\\H*\\h+\\V?\\v{3,4}/ ", "\\x09\\x20\\xa0X\\x0a\\x0b\\x0c\\x0d\\x0a", "\\x09\\x20\\xa0\\x0a\\x0b\\x0c\\x0d\\x0a", "\\x09\\x20\\xa0\\x0a\\x0b\\x0c", "** Failers ", "\\x09\\x20\\xa0\\x0a\\x0b", "", "/\\H{3,4}/", "XY ABCDE", "XY PQR ST ", "", "/.\\h{3,4}./", "XY AB PQRS"] [Just [" 0: abcabc"], Just [" 0: xyzabc"], Nothing, Nothing, Just ["/\\H\\h\\V\\v/"], Just [" 0: X X\\x0a"], Just [" 0: X\\x09X\\x0b"], Nothing, Nothing, Just ["/\\H*\\h+\\V?\\v{3,4}/ "], Just [" 0: \\x09 \\xa0X\\x0a\\x0b\\x0c\\x0d"], Just [" 1: \\x09 \\xa0X\\x0a\\x0b\\x0c"], Just [" 0: \\x09 \\xa0\\x0a\\x0b\\x0c\\x0d"], Just [" 1: \\x09 \\xa0\\x0a\\x0b\\x0c"], Just [" 0: \\x09 \\xa0\\x0a\\x0b\\x0c"], Nothing, Nothing, Just ["/\\H{3,4}/"], Just [" 0: ABCD"], Just [" 1: ABC"], Just [" 0: PQR"], Just ["/.\\h{3,4}./"], Just [" 0: B P"], Just [" 1: B "]] , testRegex "\\h*X\\h?\\H+Y\\H?Z" [] [">XNNNYZ", "> X NYQZ", "** Failers", ">XYZ ", "> X NY Z"] [Just [" 0: XNNNYZ"], Just [" 0: X NYQZ"], Nothing, Nothing, Nothing] , testRegex "\\v*X\\v?Y\\v+Z\\V*\\x0a\\V+\\x0b\\V{2,3}\\x0c" [] [">XY\\x0aZ\\x0aA\\x0bNN\\x0c", ">\\x0a\\x0dX\\x0aY\\x0a\\x0bZZZ\\x0aAAA\\x0bNNN\\x0c"] [Just [" 0: XY\\x0aZ\\x0aA\\x0bNN\\x0c"], Just [" 0: \\x0a\\x0dX\\x0aY\\x0a\\x0bZZZ\\x0aAAA\\x0bNNN\\x0c"]] , testRegex ".+A" [ERROR] ["\\r\\nA", "", "/\\nA/", "\\r\\nA "] [Nothing, Just ["/\\nA/"], Just [" 0: \\x0aA"]] , testRegex "[\\r\\n]A" [ERROR] ["\\r\\nA "] [Just [" 0: \\x0aA"]] , testRegex "(\\r|\\n)A" [ERROR] ["\\r\\nA "] [Just [" 0: \\x0aA"]] , testRegex "a\\Rb" [ERROR] ["a\\rb", "a\\nb", "a\\r\\nb", "** Failers", "a\\x85b", "a\\x0bb "] [Just ["Capturing subpattern count = 0"], Just ["Options: bsr_anycrlf"], Just ["First char = 'a'"], Just ["Need char = 'b'"], Just [" 0: a\\x0db"], Just [" 0: a\\x0ab"], Just [" 0: a\\x0d\\x0ab"], Nothing, Nothing, Nothing] , testRegex "a\\Rb" [ERROR] ["a\\rb", "a\\nb", "a\\r\\nb", "a\\x85b", "a\\x0bb ", "** Failers ", "a\\x85b\\", "a\\x0bb\\", "", "/a\\R?b/I", "a\\rb", "a\\nb", "a\\r\\nb", "** Failers", "a\\x85b", "a\\x0bb "] [Just ["Capturing subpattern count = 0"], Just ["Options: bsr_unicode"], Just ["First char = 'a'"], Just ["Need char = 'b'"], Just [" 0: a\\x0db"], Just [" 0: a\\x0ab"], Just [" 0: a\\x0d\\x0ab"], Just [" 0: a\\x85b"], Just [" 0: a\\x0bb"], Nothing, Nothing, Nothing, Just ["/a\\R?b/I"], Just ["Capturing subpattern count = 0"], Just ["Options: bsr_anycrlf"], Just ["First char = 'a'"], Just ["Need char = 'b'"], Just [" 0: a\\x0db"], Just [" 0: a\\x0ab"], Just [" 0: a\\x0d\\x0ab"], Nothing, Nothing, Nothing] , testRegex "a\\R?b" [ERROR] ["a\\rb", "a\\nb", "a\\r\\nb", "a\\x85b", "a\\x0bb ", "** Failers ", "a\\x85b\\", "a\\x0bb\\", "", "/a\\R{2,4}b/I", "a\\r\\n\\nb", "a\\n\\r\\rb", "a\\r\\n\\r\\n\\r\\n\\r\\nb", "** Failers", "a\\x85\\85b", "a\\x0b\\0bb "] [Just ["Capturing subpattern count = 0"], Just ["Options: bsr_unicode"], Just ["First char = 'a'"], Just ["Need char = 'b'"], Just [" 0: a\\x0db"], Just [" 0: a\\x0ab"], Just [" 0: a\\x0d\\x0ab"], Just [" 0: a\\x85b"], Just [" 0: a\\x0bb"], Nothing, Nothing, Nothing, Just ["/a\\R{2,4}b/I"], Just ["Capturing subpattern count = 0"], Just ["Partial matching not supported"], Just ["Options: bsr_anycrlf"], Just ["First char = 'a'"], Just ["Need char = 'b'"], Just [" 0: a\\x0d\\x0a\\x0ab"], Just [" 0: a\\x0a\\x0d\\x0db"], Just [" 0: a\\x0d\\x0a\\x0d\\x0a\\x0d\\x0a\\x0d\\x0ab"], Nothing, Nothing, Nothing] , testRegex "a\\R{2,4}b" [ERROR] ["a\\r\\rb", "a\\n\\n\\nb", "a\\r\\n\\n\\r\\rb", "a\\x85\\85b", "a\\x0b\\0bb ", "** Failers ", "a\\r\\r\\r\\r\\rb ", "a\\x85\\85b\\", "a\\x0b\\0bb\\"] [Just ["Capturing subpattern count = 0"], Just ["Partial matching not supported"], Just ["Options: bsr_unicode"], Just ["First char = 'a'"], Just ["Need char = 'b'"], Just [" 0: a\\x0d\\x0db"], Just [" 0: a\\x0a\\x0a\\x0ab"], Just [" 0: a\\x0d\\x0a\\x0a\\x0d\\x0db"], Nothing, Nothing, Nothing, Nothing, Nothing, Nothing] , testRegex " End of testinput7 " [] [] []