+# Bug 7724. Expression to validate zip codes.
+#
+"(?!0{5})(\d{5})(?!-?0{4})(-?\d{4})?" "<0><1>94040</1><2>-3344</2></0>"
+"(?!0{5})(\d{5})(?!-?0{4})(-?\d{4})?" "94040-0000"
+"(?!0{5})(\d{5})(?!-?0{4})(-?\d{4})?" "00000-3344"
+
+#
+# Bug 8666. Assertion failure on match, bad operand to JMP_SAV_X opcode.
+#
+"((.??)+|A)*" "<0><1><2></2></1></0>AAAAABBBBBCCCCCDDDDEEEEE"
+
+#
+# Bug 8826. Incorrect results with case insensitive matches.
+#
+"AS(X)" i "aßx"
+"AS.*" i "aßx" # Expansion of sharp s can't split between pattern terms.
+"ASßS" i "<0>aßß</0>" # All one literal string, does match.
+"ASß{1}S" i "aßß" # Pattern with terms, no match.
+"aßx" i "<0>assx</0>"
+"aßx" i "<0>ASSX</0>"
+"aßx" i "<0>aßx</0>"
+"ASS(.)" i "<0>aß<1>x</1></0>"
+
+# Case Insensitive, probe some corner cases.
+"ass+" i "aß" # Second 's' in pattern is qualified, can't combine with first.
+"as+" i "aß"
+"aßs" i "as" # Can't match half of a ß
+"aß+" i "<0>assssssss</0>s"
+"aß+" i "<0>assßSssSSS</0>s"
+"a(ß?)+" i "<0>assssssss<1></1></0>s"
+"a(ß?)+" i "<0>a<1></1></0>zzzzzzzzs"
+
+"\U00010400" i "<0>\U00010428</0>" # case folded supplemental code point.
+
+"sstuff" i "<0>ßtuff</0>" # exercise optimizations on what chars can start a match.
+"sstuff" i "s<0>ßtuff</0>" # exercise optimizations on what chars can start a match.
+"ßtuff" i "s<0>sstuff</0>"
+"ßtuff" i "s<0>Sstuff</0>"
+
+"a(..)\1" i "<0>A<1>bc</1>BC</0>def"
+"(ß)\1" i "aa<0><1>ss</1>ß</0>zz" # Case insensitive back reference
+"..(.)\1" i "<0>aa<1>ß</1>ss</0>"
+"ab(..)\1" i "xx<0>ab<1>ss</1>ß</0>ss"
+
+" (ss) ((\1.*)|(.*))" i "<0> <1>ss</1> <2><4>sß</4></2></0>" # The back reference 'ss' must not match in 'sß'
+
+# Bug 9057
+# \u200c and \u200d should be word characters.
+#
+"\w+" " <0>abc\u200cdef\u200dghi</0> "
+"\w+" i " <0>abc\u200cdef\u200dghi</0> "
+"[\w]+" " <0>abc\u200cdef\u200dghi</0> "
+"[\w]+" i " <0>abc\u200cdef\u200dghi</0> "
+
+# Bug 9283
+# uregex_open fails for look-behind assertion + case-insensitive
+
+"(ab)?(?<=ab)cd|ef" i "<0><1>ab</1>cd</0>"
+
+# Bug 9719 Loop breaking on (zero length match){3,} (unlimited upper bound).
+#
+
+"(?:abc){1,}abc" "<0>abcabcabcabcabc</0>"
+"(?:2*){2,}?a2\z" "<0>2a2</0>"
+"(?:2*){2,}?a2\z" "2a3"
+"(?:x?+){3,}+yz" "w<0>yz</0>"
+"(2*){2,}?a2\\z" "2a3"
+"(2*){2,}?a2\\z" "<0>2<1></1>a2\\z</0>"
+"(2*){2,}?a2\z" "<0>2<1></1>a2</0>"
+
+
+# Bug 10024
+# Incorrect (unbounded) longest match length with {1, 20} style quantifiers.
+# Unbounded match is disallowed in look-behind expressions.
+# Max match length is used to limit where to check for look-behind matches.
+
+"(?<=a{1,5})bc" "aaaa<0>bc</0>def"
+"(?<=(?:aa){3,20})bc" "aaaaaa<0>bc</0>def"
+"(?<!abc {1,100}|def {1,100}|ghi {1,100})jkl" "def jkl"
+"(?<!abc {1,100}|def {1,100}|ghi {1,100})jkl" "rst <0>jkl</0>"
+"(?<=a{11})bc" "aaaaaaaaaaa<0>bc</0>"
+"(?<=a{11})bc" "aaaaaaaaaabc"
+"(?<=a{1,})bc" E "aaaa<0>bc</0>def" # U_REGEX_LOOK_BEHIND_LIMIT error.
+"(?<=(?:){11})bc" "<0>bc</0>" # Empty (?:) expression.
+
+# Bug 10835
+# Match Start Set not being correctly computed for case insensitive patterns.
+# (Test here is to dump the compiled pattern & manually check the start set.)
+
+"(private|secret|confidential|classified|restricted)" i "hmm, <0><1>Classified</1></0> stuff"
+"(private|secret|confidential|classified|restricted)" "hmm, Classified stuff"
+
+# Bug 10844
+
+"^([\w\d:]+)$" "<0><1>DiesIst1Beispiel:text</1></0>"
+"^([\w\d:]+)$" i "<0><1>DiesIst1Beispiel:text</1></0>"
+"^(\w+\d\w+:\w+)$" "<0><1>DiesIst1Beispiel:text</1></0>"
+"^(\w+\d\w+:\w+)$" i "<0><1>DiesIst1Beispiel:text</1></0>"
+
+# Bug 11049
+# Edge cases in find() when pattern match begins with set of code points
+# and the match begins at the end of the string.
+
+"A|B|C" "hello <0>A</0>"
+"A|B|C" "hello \U00011234"
+"A|B|\U00012345" "hello <0>\U00012345</0>"
+"A|B|\U00010000" "hello \ud800"
+
+# Bug 11369
+# Incorrect optimization of patterns with a zero length quantifier {0}
+
+"(.|b)(|b){0}\$(?#xxx){3}(?>\D*)" "AAAAABBBBBCCCCCDDDDEEEEE"
+"(|b)ab(c)" "<0><1></1>ab<2>c</2></0>"
+"(|b){0}a{3}(D*)" "<0>aaa<2></2></0>"
+"(|b){0,1}a{3}(D*)" "<0><1></1>aaa<2></2></0>"
+"((|b){0})a{3}(D*)" "<0><1></1>aaa<3></3></0>"
+
+# Bug 11370
+# Max match length computation of look-behind expression gives result that is too big to fit in the
+# in the 24 bit operand portion of the compiled code. Expressions should fail to compile
+# (Look-behind match length must be bounded. This case is treated as unbounded, an error.)
+
+"(?<!(0123456789a){10000000})x" E "no match"
+"(?<!\\ubeaf(\\ubeaf{11000}){11000})" E "no match"
+
+# Bug 11374 Bad integer overflow check in number conversion.
+# 4294967300 converts to 4 with 32 bit overflow.
+
+"x{4294967300}" E "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+"x{0,4294967300}" E "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+
+# Bug 11373
+#
+# Overflow checking in max match length computation for loops.
+# Value here is 10 * 100000 * 3000 = 3E9, overflowing a 32 bit signed value.
+# Before fixing, this case gave an assertion failure.
+
+"(?<=((0123456789){100000}){3000})abc" E "abc"
+
+# Bug 11507 Capture of an unpaired surrogate shouldn't allow a back reference to
+# match half of a surrogate pair, but only another unpaired surrogate.
+#
+"pre(.)post\1" "pre\ud800post\ud800\udc00"
+"pre(.)post\1" "<0>pre<1>\ud800</1>post\ud800</0> fin"
+"pre(.)post\1" i "pre\ud800post\ud800\udc00" # case insensiteve backrefs take a different code path
+"pre(.)post\1" i "<0>pre<1>\ud800</1>post\ud800</0> fin"
+
+# Bug 11554
+#
+# Maximum match length computation was assuming UTF-16.
+# Used in look-behind matches to constrain how far back to look.
+
+"(?<=a\x{100000})spam" "***a\x{100000}<0>spam</0>**"
+"(?<=aą)spam" "**aą<0>spam</0>**"
+"(?<=ąabc)spam" "**ąabc<0>spam</0>**"
+
+"(?<=a\x{100000})spam" "***a\x{100001}spam**"
+"(?<=aą)spam" "**bąspam**"
+"(?<=ąabc)spam" "**ąabxspam**"
+
+# with negative look-behind
+
+"(?<!a\x{100000})spam" "***a\x{100000}spam**"
+"(?<!aą)spam" "**aąspam**"
+"(?<!ąabc)spam" "**ąabcspam**"
+
+"(?<!a\x{100000})spam" "***a\x{100001}<0>spam</0>**"
+"(?<!aą)spam" "**bą<0>spam</0>**"
+"(?<!ąabc)spam" "**ąabx<0>spam</0>**"
+