This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix perl #126186 make all verbs allow an optional arg
[perl5.git] / t / re / re_tests
index e7680c9..4255fbc 100644 (file)
@@ -2,9 +2,10 @@
 # run this file via a shell glob.  The full format of this file is given
 # in regexp.t
 # Prior to the implementation of autoloading of \N{}, tests that used \N{name}
-# could not go in this file, and were farmed out to other .t's.
+# could not go in this file, and were farmed out to other .t's, where they
+# remain
 #
-# pat  string  y/n/etc expr    expected-expr   skip-reason
+# pat  string  y/n/etc expr    expected-expr   skip-reason     comment
 __END__
 abc    abc     y       $&      abc
 abc    abc     y       $-[0]   0
@@ -107,7 +108,7 @@ a[b-d]e     ace     y       $&      ace
 a[b-d] aac     y       $&      ac
 a[-b]  a-      y       $&      a-
 a[b-]  a-      y       $&      a-
-a[b-a] -       c       -       Invalid [] range \"b-a\"
+a[b-a] -       c       -       Invalid [] range
 a[]b   -       c       -       Unmatched [
 a[     -       c       -       Unmatched [
 a]     a]      y       $&      a]
@@ -133,6 +134,7 @@ a[^]b]c     adc     y       $&      adc
 \By\b  xy      y       -       -
 \by\B  yz      y       -       -
 \By\B  xyz     y       -       -
+\B             y       -       -
 \w     a       y       -       -
 \w     -       n       -       -
 \W     a       n       -       -
@@ -162,6 +164,7 @@ ab|cd       abcd    y       $&      ab
 ()ef   def     y       $&-$1   ef-
 ()ef   def     y       $-[0]   1
 ()ef   def     y       $+[0]   3
+()\x{100}\x{1000}      d\x{100}\x{1000}        y       $+[0]   3
 ()ef   def     y       $-[1]   1
 ()ef   def     y       $+[1]   1
 *a     -       c       -       Quantifier follows nothing
@@ -253,6 +256,7 @@ a[bcd]+dcdcde       adcdcde n       -       -
 ((a)(b)c)(d)   abcd    y       $-[4]   3
 ((a)(b)c)(d)   abcd    y       $+[4]   4
 [a-zA-Z_][a-zA-Z0-9_]* alpha   y       $&      alpha
+[_A-Z] }       n       -       -               # This could match on EBCDIC if A-Z not excluding things in middle
 ^a(bc+|b[eh])g|.h$     abh     y       $&-$1   bh-
 (bc+d$|ef*g.|h?i(j|k)) effgz   y       $&-$1-$2        effgz-effgz-
 (bc+d$|ef*g.|h?i(j|k)) ij      y       $&-$1-$2        ij-ij-j
@@ -350,7 +354,7 @@ a[-]?c      ac      y       $&      ac
 'a[b-d]'i      AAC     y       $&      AC
 'a[-b]'i       A-      y       $&      A-
 'a[b-]'i       A-      y       $&      A-
-'a[b-a]'i      -       c       -       Invalid [] range \"b-a\"
+'a[b-a]'i      -       c       -       Invalid [] range
 'a[]b'i        -       c       -       Unmatched [
 'a['i  -       c       -       Unmatched [
 'a]'i  A]      y       $&      A]
@@ -480,7 +484,7 @@ a(?:b|(c|e){1,2}?|d)+?(.)   ace     y       $1$2    ce
 (?<!c)b        cb      n       -       -
 (?<!c)b        b       y       -       -
 (?<!c)b        b       y       $&      b
-(?<%)b -       c       -       Sequence (?<%...) not recognized
+(?<%)b -       c       -       Group name must start with a non-digit word character
 (?:..)*a       aba     y       $&      aba
 (?:..)*?a      aba     y       $&      a
 ^(?:b|a(?=(.)))*\1     abc     y       $&      ab
@@ -534,12 +538,13 @@ a(?:b|(c|e){1,2}?|d)+?(.) ace     y       $1$2    ce
 '(ab)\d\1'i    ab4Ab   y       $1      ab
 foo\w*\d{4}baz foobar1234baz   y       $&      foobar1234baz
 a(?{})b        cabd    y       $&      ab
-a(?{)b -       c       -       Sequence (?{...}) not terminated or not {}-balanced
-a(?{{})b       -       c       -       Sequence (?{...}) not terminated or not {}-balanced
+a(?{f()+       -       c       -       Missing right curly or square bracket
+a(?{{1}+       -       c       -       Missing right curly or square bracket
+ (?{(^{})      -       c       -       syntax error
 a(?{}})b       -       c       -       
-a(?{"{"})b     -       c       -       Sequence (?{...}) not terminated or not {}-balanced
+a(?{"{"})b     ab      y       -       -
 a(?{"\{"})b    cabd    y       $&      ab
-a(?{"{"}})b    -       c       -       Unmatched right curly bracket
+a(?{"{"}})b    -       c       -       Sequence (?{...}) not terminated with ')'
 a(?{$::bl="\{"}).b     caxbd   y       $::bl   {
 x(~~)*(?:(?:F)?)?      x~~     y       -       -
 ^a(?#xxx){3}c  aaac    y       $&      aaac
@@ -580,8 +585,8 @@ x(~~)*(?:(?:F)?)?   x~~     y       -       -
 ^(\(+)?blah(?(1)(\)))$ blah    y       ($2)    ()
 ^(\(+)?blah(?(1)(\)))$ blah)   n       -       -
 ^(\(+)?blah(?(1)(\)))$ (blah   n       -       -
-(?(1?)a|b)     a       c       -       Switch condition not recognized
-(?(1)a|b|c)    a       c       -       Switch (?(condition)... contains too many branches
+(?(1?)a|b)     -       c       -       Switch condition not recognized
+(?(1)a|b|c)    -       c       -       Switch (?(condition)... contains too many branches
 (?(?{0})a|b)   a       n       -       -
 (?(?{0})b|a)   a       y       $&      a
 (?(?{1})b|a)   a       n       -       -
@@ -590,6 +595,10 @@ x(~~)*(?:(?:F)?)?  x~~     y       -       -
 (?(?!a)b|a)    a       y       $&      a
 (?(?=a)b|a)    a       n       -       -
 (?(?=a)a|b)    a       y       $&      a
+(?(?!\x{100})\x{100}|b)        \x{100} n       -       -
+(?(?!\x{100})b|\x{100})        \x{100} y       $&      \x{100}
+(?(?=\x{100})b|\x{100})        \x{100} n       -       -
+(?(?=\x{100})\x{100}|b)        \x{100} y       $&      \x{100}
 (?=(a+?))(\1ab)        aaab    y       $2      aab
 ^(?=(a+?))\1ab aaab    n       -       -
 (\w+:)+        one:    y       $1      one:
@@ -607,6 +616,8 @@ $(?<=^(a))  a       y       $1      a
 ^[^bcd]*(c+)   aexycd  y       $1      c
 (?{$a=2})a*aa(?{local$a=$a+1})k*c(?{$b=$a})    yaaxxaaaacd     y       $b      3
 (?{$a=2})(a(?{local$a=$a+1}))*aak*c(?{$b=$a})  yaaxxaaaacd     y       $b      4
+# [perl #117917]
+^(a(?{ "x" =~ m{x}})b)(??{ $1 })       abab    y       $&      abab
 (>a+)ab        aaab    n       -       -
 (?>a+)b        aaab    y       -       -
 ([[:]+)        a:[b]:  y       $1      :[
@@ -615,12 +626,11 @@ $(?<=^(a))        a       y       $1      a
 [a[:xyz:       -       c       -       Unmatched [
 [a[:xyz:]      -       c       -       POSIX class [:xyz:] unknown
 [a[:]b[:c]     abc     y       $&      abc
-([a[:xyz:]b]+) pbaq    c       -       POSIX class [:xyz:] unknown
-[a[:]b[:c]     abc     y       $&      abc
+([a[:xyz:]b]+) -       c       -       POSIX class [:xyz:] unknown
 ([[:alpha:]]+) ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ABcd
 ([[:alnum:]]+) ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ABcd01Xy
 ([[:ascii:]]+) ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ABcd01Xy__--  ${nulnul}
-([[:cntrl:]]+) ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ${nulnul}
+([[:cntrl:]]+) ABcd01Xy__--  ${nulnul}${ffff}  ya      $1      ${nulnul}       ff is a control on EBCDIC (non-POSIX-BC), so this fails under /u rules
 ([[:digit:]]+) ABcd01Xy__--  ${nulnul}${ffff}  y       $1      01
 ([[:graph:]]+) ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ABcd01Xy__--
 ([[:lower:]]+) ABcd01Xy__--  ${nulnul}${ffff}  y       $1      cd
@@ -633,6 +643,7 @@ $(?<=^(a))  a       y       $1      a
 ([[:^alpha:]]+)        ABcd01Xy__--  ${nulnul}${ffff}  y       $1      01
 ((?a)[[:^alnum:]]+)    ABcd01Xy__--  ${nulnul}${ffff}  y       $1      __--  ${nulnul}${ffff}
 ([[:^ascii:]]+)        ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ${ffff}
+([:[:^ascii:]]+)       ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ${ffff} RT #120799
 ([[:^cntrl:]]+)        ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ABcd01Xy__--  
 ([[:^digit:]]+)        ABcd01Xy__--  ${nulnul}${ffff}  y       $1      ABcd
 ([[:^lower:]]+)        ABcd01Xy__--  ${nulnul}${ffff}  y       $1      AB
@@ -644,12 +655,12 @@ $(?<=^(a))        a       y       $1      a
 ([[:^xdigit:]]+)       ABcd01Xy__--  ${nulnul}${ffff}  y       $1      Xy__--  ${nulnul}${ffff}
 [[:foo:]]      -       c       -       POSIX class [:foo:] unknown
 [[:^foo:]]     -       c       -       POSIX class [:^foo:] unknown
+'[[:^cntrl:]]+'u       a\x80   y       $&      a       \x80 was matching on EBCDIC platforms
 ((?>a+)b)      aaab    y       $1      aaab
 (?>(a+))b      aaab    y       $1      aaa
 ((?>[^()]+)|\([^()]*\))+       ((abc(ade)ufh()()x      y       $&      abc(ade)ufh()()x
 (?<=x+)y       -       c       -       Variable length lookbehind not implemented
-a{37,17}       -       c       -       Can't do {n,m} with n > m
-a{37,0}        -       c       -       Can't do {n,m} with n > m
+((def){37,17})?ABC     ABC     y       $&      ABC
 \Z     a\nb\n  y       $-[0]   3
 \z     a\nb\n  y       $-[0]   4
 $      a\nb\n  y       $-[0]   3
@@ -848,6 +859,7 @@ abb$        b\nca   n       -       -
 'abb\Z'm       b\nca   n       -       -
 'abb\z'm       b\nca   n       -       -
 'abb$'m        b\nca   n       -       -
+'\Aa$'m        a\n\n   y       $&      a
 (^|x)(c)       ca      y       $2      c
 a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz   x       n       -       -
 a(?{$a=2;$b=3;($b)=$a})b       yabz    y       $b      2
@@ -875,12 +887,18 @@ foo.bart  foo.bart        y       -       -
 .[X](.+)+[X][X]        bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n       -       -
 .[X][X](.+)+[X]        bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n       -       -
 tt+$   xxxtt   y       -       -
-([a-\d]+)      za-9z   y       $1      a-9
-([\d-z]+)      a0-za   y       $1      0-z
-([\d-\s]+)     a0- z   y       $1      0- 
-([a-[:digit:]]+)       za-9z   y       $1      a-9
-([[:digit:]-z]+)       =0-z=   y       $1      0-z
-([[:digit:]-[:alpha:]]+)       =0-z=   y       $1      0-z
+([a-\d]+)      za-9z   Sy      $1      a-9
+([a-\d]+)      -       sc      -       False [] range
+([\d-z]+)      a0-za   Sy      $1      0-z
+([\d-z]+)      -       sc      $1      False [] range
+([\d-\s]+)     a0- z   Sy      $1      0- 
+([\d-\s]+)     -       sc      $1      False [] range
+([a-[:digit:]]+)       za-9z   Sy      $1      a-9
+([a-[:digit:]]+)       -       sc      -       False [] range
+([[:digit:]-z]+)       =0-z=   Sy      $1      0-z
+([[:digit:]-z]+)       -       sc      c       False [] range
+([[:digit:]-[:alpha:]]+)       =0-z=   Sy      $1      0-z
+([[:digit:]-[:alpha:]]+)       -       sc      -       False [] range
 \GX.*X aaaXbX  n       -       -
 (\d+\.\d+)     3.1415926       y       $1      3.1415926
 (\ba.{0,10}br) have a web browser      y       $1      a web br
@@ -995,8 +1013,8 @@ a(b)??     abc     y       <$1>    <>      # undef [perl #16773]
 ^.{2,3}?((?:b|a|r)+?)\1\z      foobarbar       y       $1      bar
 ^(?:f|o|b){2,3}?((?:b|a|r)+?)\1\z      foobarbar       y       $1      bar
 .*a(?!(b|cd)*e).*f     ......abef      n       -       -       # [perl #23030]
-x(?#   x       c       -       Sequence (?#... not terminated
-:x(?#: x       c       -       Sequence (?#... not terminated
+x(?#   -       c       -       Sequence (?#... not terminated
+:x(?#: -       c       -       Sequence (?#... not terminated
 (WORDS|WORD)S  WORDS   y       $1      WORD
 (X.|WORDS|X.|WORD)S    WORDS   y       $1      WORD
 (WORDS|WORLD|WORD)S    WORDS   y       $1      WORD
@@ -1042,6 +1060,7 @@ X(?:ABCF[cC]x*|ABCD|ABCF):(?:DIT|DID|DIM) XABCFCxxxxxxxxxx:DIM    y       $&      XABCFCxxxxxx
 (?=foo)        foo     y       pos     0
 (?=foo)        XfooY   y       pos     1
 .*(?=foo)      XfooY   y       pos     1
+(?=.*P)P       aP      y       pos     2
 (?<=foo)       foo     y       pos     3
 (?<=foo)       XfooY   y       pos     4
 .*(?<=foo)     foo     y       pos     3
@@ -1081,9 +1100,9 @@ X(?<=foo.)[YZ]    ..XfooXY..      y       pos     8
 (?P<n>foo|bar|baz)(?P<m>[ew]+) snofooewa       yM      $+{m}   ew      miniperl cannot load Tie::Hash::NamedCapture
 (?P<n>foo)|(?P<n>bar)|(?P<n>baz)       snofooewa       yM      $+{n}   foo     miniperl cannot load Tie::Hash::NamedCapture
 (?P<n>foo)(??{ $+{n} })        snofooefoofoowaa        yM      $+{n}   foo     miniperl cannot load Tie::Hash::NamedCapture
-(?P<=n>foo|bar|baz)    snofooewa       c       -       Sequence (?P<=...) not recognized
-(?P<!n>foo|bar|baz)    snofooewa       c       -       Sequence (?P<!...) not recognized
-(?PX<n>foo|bar|baz)    snofooewa       c       -       Sequence (?PX<...) not recognized
+(?P<=n>foo|bar|baz)    -       c       -       Group name must start with a non-digit word character
+(?P<!n>foo|bar|baz)    -       c       -       Group name must start with a non-digit word character
+(?PX<n>foo|bar|baz)    -       c       -       Sequence (?PX...) not recognized
 /(?'n'foo|bar|baz)/    snofooewa       y       $1      foo
 /(?'n'foo|bar|baz)/    snofooewa       yM      $+{n}   foo     miniperl cannot load Tie::Hash::NamedCapture
 /(?'n'foo|bar|baz)(?'m'[ew]+)/ snofooewa       yM      $+{n}   foo     miniperl cannot load Tie::Hash::NamedCapture
@@ -1120,6 +1139,8 @@ X(?<=foo.)[YZ]    ..XfooXY..      y       pos     8
 /(ab)+((?1))(fox)/     ababfox y       $1-$2-$3        ab-ab-fox
 /(ab){1,100}((?1))(fox)/       ababfox y       $1-$2-$3        ab-ab-fox
 /(ab){0,100}((?1))(fox)/       ababfox y       $1-$2-$3        ab-ab-fox
+foo(?0)?bar    phoofoofoobarbarbarr    y       $&      foofoobarbar
+foo(?R)?bar    phoofoofoobarbarbarr    y       $&      foofoobarbar
 # possessive captures
 a++a   aaaaa   n       -       -
 a*+a   aaaaa   n       -       -
@@ -1261,30 +1282,30 @@ a*(*F)  aaaab   n       -       -
 /(?<_>foo) \k<_>/      ..foo foo..     yM      $+{_}   foo     miniperl cannot load Tie::Hash::NamedCapture
 /(?'_0_'foo) \k'_0_'/  ..foo foo..     yM      $+{_0_} foo     miniperl cannot load Tie::Hash::NamedCapture
 /(?<_0_>foo) \k<_0_>/  ..foo foo..     yM      $+{_0_} foo     miniperl cannot load Tie::Hash::NamedCapture
-/(?'0'foo) bar/        ..foo bar..     c       -       Sequence (?'
-/(?<0>foo) bar/        ..foo bar..     c       -       Sequence (?<
-/(?'12'foo) bar/       ..foo bar..     c       -       Sequence (?'
-/(?<12>foo) bar/       ..foo bar..     c       -       Sequence (?<
-/(?'1a'foo) bar/       ..foo bar..     c       -       Sequence (?'
-/(?<1a>foo) bar/       ..foo bar..     c       -       Sequence (?<
-/(?''foo) bar/ ..foo bar..     c       -       Sequence (?''
-/(?<>foo) bar/ ..foo bar..     c       -       Sequence (?<>
-/foo \k'n'/    foo foo c       -       Reference to nonexistent named group
-/foo \k<n>/    foo foo c       -       Reference to nonexistent named group
-/foo \k'a1'/   foo foo c       -       Reference to nonexistent named group
-/foo \k<a1>/   foo foo c       -       Reference to nonexistent named group
-/foo \k'_'/    foo foo c       -       Reference to nonexistent named group
-/foo \k<_>/    foo foo c       -       Reference to nonexistent named group
-/foo \k'_0_'/  foo foo c       -       Reference to nonexistent named group
-/foo \k<_0_>/  foo foo c       -       Reference to nonexistent named group
-/foo \k'0'/    foo foo c       -       Sequence \\k'
-/foo \k<0>/    foo foo c       -       Sequence \\k<
-/foo \k'12'/   foo foo c       -       Sequence \\k'
-/foo \k<12>/   foo foo c       -       Sequence \\k<
-/foo \k'1a'/   foo foo c       -       Sequence \\k'
-/foo \k<1a>/   foo foo c       -       Sequence \\k<
-/foo \k''/     foo foo c       -       Sequence \\k'
-/foo \k<>/     foo foo c       -       Sequence \\k<
+/(?'0'foo) bar/        -       c       -       Group name must start with a non-digit word character
+/(?<0>foo) bar/        -       c       -       Group name must start with a non-digit word character
+/(?'12'foo) bar/       -       c       -       Group name must start with a non-digit word character
+/(?<12>foo) bar/       -       c       -       Group name must start with a non-digit word character
+/(?'1a'foo) bar/       -       c       -       Group name must start with a non-digit word character
+/(?<1a>foo) bar/       -       c       -       Group name must start with a non-digit word character
+/(?''foo) bar/ -       c       -       Group name must start with a non-digit word character
+/(?<>foo) bar/ -       c       -       Group name must start with a non-digit word character
+/foo \k'n'/    -       c       -       Reference to nonexistent named group
+/foo \k<n>/    -       c       -       Reference to nonexistent named group
+/foo \k'a1'/   -       c       -       Reference to nonexistent named group
+/foo \k<a1>/   -       c       -       Reference to nonexistent named group
+/foo \k'_'/    -       c       -       Reference to nonexistent named group
+/foo \k<_>/    -       c       -       Reference to nonexistent named group
+/foo \k'_0_'/  -       c       -       Reference to nonexistent named group
+/foo \k<_0_>/  -       c       -       Reference to nonexistent named group
+/foo \k'0'/    -       c       -       Group name must start with a non-digit word character
+/foo \k<0>/    -       c       -       Group name must start with a non-digit word character
+/foo \k'12'/   -       c       -       Group name must start with a non-digit word character
+/foo \k<12>/   -       c       -       Group name must start with a non-digit word character
+/foo \k'1a'/   -       c       -       Group name must start with a non-digit word character
+/foo \k<1a>/   -       c       -       Group name must start with a non-digit word character
+/foo \k''/     -       c       -       Group name must start with a non-digit word character
+/foo \k<>/     -       c       -       Group name must start with a non-digit word character
 /(?<as>as) (\w+) \k<as> (\w+)/ as easy as pie  y       $1-$2-$3        as-easy-pie
 
 # \g{...} with a name as the argument 
@@ -1409,9 +1430,11 @@ foo(\h)bar       foo\tbar        y       $1      \t
 /[a\N{U+0100}]/        \x{100} y       $&      \x{100}
 /[a\N{U+0100}]/        a       y       $&      a
 
-# Verify that \N{U+...} forces Unicode semantics
+# Verify that \N{U+...} forces Unicode rules
 /\N{U+41}\x{c1}/i      a\x{e1} y       $&      a\x{e1}
 /[\N{U+41}\x{c1}]/i    \x{e1}  y       $&      \x{e1}
+'\N{U+41}'     A       y       $&      A               # Even for single quoted patterns
+/\N{}\xe4/i    \xc4    y       $&      \xc4            # Empty \N{} should change /d to /u
 
 [\s][\S]       \x{a0}\x{a0}    n       -       -       # Unicode complements should not match same character
 
@@ -1433,16 +1456,18 @@ abc\N   abc\n   n
 # and bypasses the lexer.
 /\N{U+}/       -       c       -       Invalid hexadecimal number
 # Below currently gives a misleading message
-/[\N{U+}]/     -       c       -       Unmatched
+/[\N{U+}]/     -       Sc      -       Unmatched
+/[\N{U+}]/     -       sc      -       Syntax error in (?[...])
 /abc\N{def/    -       c       -       Missing right brace
-/\N{U+4AG3}/   -       c       -       Illegal hexadecimal digit
-/[\N{U+4AG3}]/ -       c       -       Illegal hexadecimal digit
+/\N{U+4AG3}/   -       c       -       Invalid hexadecimal number
+/[\N{U+4AG3}]/ -       Sc      -       Unmatched
+/[\N{U+4AG3}]/ -       sc      -       Syntax error in (?[...])
 
 # And verify that in single quotes which bypasses the lexer, the regex compiler
 # figures it out.
 \N{U+} -       c       -       Invalid hexadecimal number
 [\N{U+}]       -       c       -       Invalid hexadecimal number
-\N{U+4AG3}     -       c       -       Illegal hexadecimal digit
+\N{U+4AG3}     -       c       -       Invalid hexadecimal number
 [\N{U+4AG3}]   -       c       -       Invalid hexadecimal number
 abc\N{def      -       c       -       \\N{NAME} must be resolved by the lexer
 
@@ -1450,17 +1475,34 @@ abc\N{def       -       c       -       \\N{NAME} must be resolved by the lexer
 /abc\N {U+41}/x        -       c       -       Missing braces
 /abc\N {SPACE}/x       -       c       -       Missing braces
 
-# Verifies catches hex errors, and doesn't expose our . notation to the outside
-/\N{U+0xBEEF}/ -       c       -       Illegal hexadecimal digit
-/\N{U+BEEF.BEAD}/      -       c       -       Illegal hexadecimal digit
+# Verifies catches hex errors
+/\N{U+0xBEEF}/ -       c       -       Invalid hexadecimal number
+# Used to be an error, but not any more:
+/\N{U+BEEF.BEAD}/      -       c       -       
 
 # Verify works in single quotish context; regex compiler delivers slightly different msg
 # \N{U+BEEF.BEAD} succeeds here, because can't completely hide it from the outside.
-\N{U+0xBEEF}   -       c       -       Illegal hexadecimal digit
-\c`    -       c       -       \"\\c`\" is more clearly written simply as \"\\ \"
-\c1    -       c       -       \"\\c1\" is more clearly written simply as \"q\"
-\cA    \001    y       $&      \1
-
+\N{U+0xBEEF}   -       c       -       Invalid hexadecimal number
+\c`    -       ac      -       \"\\c`\" is more clearly written simply as \"\\ \"
+\c1    -       ac      -       \"\\c1\" is more clearly written simply as \"q\"
+\c@    \0      y       $&      \0
+\cA    \001    y       $&      \001
+\cB    \002    y       $&      \002
+\cC    \003    y       $&      \003
+\cI    \011    y       $&      \011
+\cJ    \012    y       $&      \012
+\cR    \022    y       $&      \022
+\cS    \023    y       $&      \023
+\cX    \030    y       $&      \030
+\cY    \031    y       $&      \031
+\cZ    \032    y       $&      \032
+\c[    \033    y       $&      \033
+\c\X   \034X   y       $&      \034X
+\c]    \035    y       $&      \035
+\c^    \036    y       $&      \036
+\c_    \037    y       $&      \037
+\c?    \177    ay      $&      \177
+\c?    \x9F    ey      $&      \x9F            \c? is APC on EBCDIC
 \400   \x{100} y       $&      \x{100}
 \600   \x{180} y       $&      \x{180}
 \777   \x{1FF} y       $&      \x{1FF}
@@ -1474,15 +1516,65 @@ abc\N{def       -       c       -       \\N{NAME} must be resolved by the lexer
 [a\o{400}]     \x{100} y       $&      \x{100}
 [a\o{1000}]    \x{200} y       $&      \x{200}
 
+# The below were inserting a NULL
+\87    87      c       -       Reference to nonexistent group in regex
+a\87   a87     c       -       Reference to nonexistent group in regex
+a\97   a97     c       -       Reference to nonexistent group in regex
+
+# avoid problems with 32-bit signed integer overflow
+
+(.)\g2147483648}       x       c       -       Reference to nonexistent group in regex
+(.)\g2147483649}       x       c       -       Reference to nonexistent group in regex
+(.)\g2147483650}       x       c       -       Reference to nonexistent group in regex
+(.)\g4294967296}       x       c       -       Reference to nonexistent group in regex
+(.)\g4294967297}       x       c       -       Reference to nonexistent group in regex
+(.)\g4294967298}       x       c       -       Reference to nonexistent group in regex
+a(.)\g2147483648}      x       c       -       Reference to nonexistent group in regex
+a(.)\g2147483649}      x       c       -       Reference to nonexistent group in regex
+a(.)\g2147483650}      x       c       -       Reference to nonexistent group in regex
+a(.)\g4294967296}      x       c       -       Reference to nonexistent group in regex
+a(.)\g4294967297}      x       c       -       Reference to nonexistent group in regex
+a(.)\g4294967298}      x       c       -       Reference to nonexistent group in regex
+
+(.)\g{2147483648}      x       c       -       Reference to nonexistent group in regex
+(.)\g{2147483649}      x       c       -       Reference to nonexistent group in regex
+(.)\g{2147483650}      x       c       -       Reference to nonexistent group in regex
+(.)\g{4294967296}      x       c       -       Reference to nonexistent group in regex
+(.)\g{4294967297}      x       c       -       Reference to nonexistent group in regex
+(.)\g{4294967298}      x       c       -       Reference to nonexistent group in regex
+a(.)\g{2147483648}     x       c       -       Reference to nonexistent group in regex
+a(.)\g{2147483649}     x       c       -       Reference to nonexistent group in regex
+a(.)\g{2147483650}     x       c       -       Reference to nonexistent group in regex
+a(.)\g{4294967296}     x       c       -       Reference to nonexistent group in regex
+a(.)\g{4294967297}     x       c       -       Reference to nonexistent group in regex
+a(.)\g{4294967298}     x       c       -       Reference to nonexistent group in regex
+
+(.)\2147483648 b\o{214}7483648 ya      $1      b       \d not converted to native; \o{} is
+(.)\2147483649 b\o{214}7483649 ya      $1      b       \d not converted to native; \o{} is
+(.)\2147483650 b\o{214}7483650 ya      $1      b       \d not converted to native; \o{} is
+(.)\4294967296 b\o{42}94967296 ya      $1      b       \d not converted to native; \o{} is
+(.)\4294967297 b\o{42}94967297 ya      $1      b       \d not converted to native; \o{} is
+(.)\4294967298 b\o{42}94967298 ya      $1      b       \d not converted to native; \o{} is
+a(.)\2147483648        ab\o{214}7483648        ya      $1      b       \d not converted to native; \o{} is
+a(.)\2147483649        ab\o{214}7483649        ya      $1      b       \d not converted to native; \o{} is
+a(.)\2147483650        ab\o{214}7483650        ya      $1      b       \d not converted to native; \o{} is
+a(.)\4294967296        ab\o{42}94967296        ya      $1      b       \d not converted to native; \o{} is
+a(.)\4294967297        ab\o{42}94967297        ya      $1      b       \d not converted to native; \o{} is
+a(.)\4294967298        ab\o{42}94967298        ya      $1      b       \d not converted to native; \o{} is
+
 # The below was inserting a NULL into the character class.
-[\8\9] \000    n       -       -
-[\8\9] 8       y       $&      8
-[\8\9] 9       y       $&      9
+[\8\9] \000    Sn      -       -
+[\8\9] -       sc      $&      Unrecognized escape \\8 in character class
+[\8\9] 8       Sy      $&      8
+[\8\9] 9       Sy      $&      9
 
 # Verify that reads 1-3 octal digits, and that \_ works in char class
-[\0]   \000    y       $&      \000
-[\07]  \007    y       $&      \007
-[\07]  7\000   n       -       -
+[\0]   \000    Sy      $&      \000
+[\0]   -       sc      -       Need exactly 3 octal digits
+[\07]  \007    Sy      $&      \007
+[\07]  -       sc      -       Need exactly 3 octal digits
+[\07]  7\000   Sn      -       -
+[\07]  -       sc      -       Need exactly 3 octal digits
 [\006] \006    y       $&      \006
 [\006] 6\000   n       -       -
 [\0005]        \0005   y       $&      \000
@@ -1524,7 +1616,7 @@ abc\N{def -       c       -       \\N{NAME} must be resolved by the lexer
 # Normally 1E9E generates a multi-char fold, but not in inverted class;
 # See [perl #89750].  This makes sure that the simple fold gets generated
 # in that case, to DF.
-/[^\x{1E9E}]/i \x{DF}        -       -
+/[^\x{1E9E}]/i \x{DF}  Sn      -       -
 
 # RT #96354
 /^.*\d\H/      X1      n       -       -
@@ -1536,7 +1628,8 @@ abc\N{def -       c       -       \\N{NAME} must be resolved by the lexer
 /^\p{L}/       \x{3400}        y       $&      \x{3400}
 
 # RT #89774
-/[s\xDF]/ui    \xDFs   ybT     $&      \xDFs
+/[s\xDF]a/ui   ssa     Sy      $&      ssa
+/[s\xDF]a/ui   sa      y       $&      sa
 
 # RT #99928
 /^\R\x0A$/     \x0D\x0A        n       -       -
@@ -1545,6 +1638,20 @@ abc\N{def        -       c       -       \\N{NAME} must be resolved by the lexer
 /ff/i  \x{FB01}\x{FB00}        y       $&      \x{FB00}
 /fi/i  \x{FB01}\x{FB00}        y       $&      \x{FB01}
 /fi/i  \x{FB00}\x{FB01}        y       $&      \x{FB01}
+#
+# Make sure we don't see code blocks where there aren't, and vice-versa
+(?#( (?{1+)a   a       y       -       -
+'a# (?{1+'x    a       y       -       -
+ab[(?{1]       ab1     y       -       -
+ab[(?{1\](?{2] ab2     y       -       -
+ab(?{"["})cd   abcd    y       -       -
+ab(??{"[x]"})cd        abxcd   y       -       -
+ab\[(??{1})c   ab[1c   y       -       -
+ab\\[(??{1;})]c        ab\\;c  y       -       -
+ab\\\[(??{1})c ab\\[1c y       -       -
+ab[c\](??{"]d  abcd    y       -       -
+ab[c\\](??{"[x]"})d    ab\\xd  y       -       -
+ab[c\\\](??{"x"})]{3}d ab\\](d y       -       -
 
 # These test that doesn't cut-off matching too soon in the string for
 # multi-char folds
@@ -1553,6 +1660,8 @@ abc\N{def -       c       -       \\N{NAME} must be resolved by the lexer
 
 /st/i  \x{DF}\x{FB05}  y       $&      \x{FB05}
 /ssst/i        \x{DF}\x{FB05}  y       $&      \x{DF}\x{FB05}
+/[s]s/i        \x{DF}  n       -       -
+/s[s]/i        \x{DF}  n       -       -
 
 # [perl #101970]
 /[[:lower:]]/i \x{100} y       $&      \x{100}
@@ -1575,4 +1684,257 @@ abc\N{def       -       c       -       \\N{NAME} must be resolved by the lexer
 # [perl #110648]
 [^\p{Alphabetic}]      \x{100} n       -       -
 
+# [perl #111400].  Tests the first Y/N boundary above 255 for each of these.
+/[[:alnum:]]/  \x{2c1} y       -       -
+/[[:alnum:]]/  \x{2c2} n       -       -
+/[[:alpha:]]/  \x{2c1} y       -       -
+/[[:alpha:]]/  \x{2c2} n       -       -
+/[[:graph:]]/  \x{377} y       -       -
+/[[:graph:]]/  \x{378} n       -       -
+/[[:lower:]]/  \x{100} n       -       -
+/[[:lower:]]/  \x{101} y       -       -
+/[[:lower:]]/  \x{102} n       -       -
+/[[:print:]]/  \x{377} y       -       -
+/[[:print:]]/  \x{378} n       -       -
+/[[:punct:]]/  \x{37D} n       -       -
+/[[:punct:]]/  \x{37E} y       -       -
+/[[:punct:]]/  \x{388} n       -       -
+/[[:upper:]]/  \x{100} y       -       -
+/[[:upper:]]/  \x{101} n       -       -
+/[[:word:]]/   \x{2c1} y       -       -
+/[[:word:]]/   \x{2c2} n       -       -
+
+# [perl #113400]
+/syntax OK\s+\z/si     t/bin/good.pl syntax OK\n       y       -       -
+
+/^(.*?)\s*\|\s*(?:\/\s*|)'(.+)'$/      text|'sec'      y       <$1><$2>        <text><sec>
+/^(foo|)bar$/  bar     y       <$&>    <bar>
+/^(foo||baz)bar$/      bar     y       <$&>    <bar>
+/^(foo||baz)bar$/      bazbar  y       <$1>    <baz>
+/^(foo||baz)bar$/      foobar  y       <$1>    <foo>
+
+/^(?:foo|)bar$/        bar     y       <$&>    <bar>
+/^(?:foo||baz)bar$/    bar     y       <$&>    <bar>
+/^(?:foo||baz)bar$/    bazbar  y       <$&>    <bazbar>
+/^(?:foo||baz)bar$/    foobar  y       <$&>    <foobar>
+
+/^(?i:foo|)bar$/       bar     y       <$&>    <bar>
+/^(?i:foo||baz)bar$/   bar     y       <$&>    <bar>
+/^(?i:foo||baz)bar$/   bazbar  y       <$&>    <bazbar>
+/^(?i:foo||baz)bar$/   foobar  y       <$&>    <foobar>
+
+# $^N, $+ on backtrackracking
+# BRANCH
+^(.)(?:(..)|B)[CX]     ABCDE   y       $^N-$+  A-A     -
+# TRIE
+^(.)(?:BC(.)|B)[CX]    ABCDE   y       $^N-$+  A-A     -
+# CURLYX
+^(.)(?:(.)+)*[BX]      ABCDE   y       $^N-$+  A-A     -
+# CURLYM
+^(.)(BC)*      ABCDE   y       $^N-$+  BC-BC   -
+^(.)(BC)*[BX]  ABCDE   y       $^N-$+  A-A     -
+# CURLYN
+^(.)(B)*.[DX]  ABCDE   y       $^N-$+  B-B     -
+^(.)(B)*.[CX]  ABCDE   y       $^N-$+  A-A     -
+
+# using 'return' in code blocks
+^(A)(?{"xyz"})B$       AB      y       $1-$^R  A-xyz   -
+^(A)(?{return "xyz"})B$        AB      y       $1-$^R  A-xyz   -
+^(A)((??{"xyz"}))$     Axyz    y       $1-$2   A-xyz   -
+^(A)((??{return "xyz"}))$      Axyz    y       $1-$2   A-xyz   -
+^(A)((?(?{1})abc|xyz))$        Aabc    y       $1-$2   A-abc   -
+^(A)((?(?{0})abc|xyz))$        Axyz    y       $1-$2   A-xyz   -
+^(A)((?(?{return 1})abc|xyz))$ Aabc    y       $1-$2   A-abc   -
+^(A)((?(?{return 0})abc|xyz))$ Axyz    y       $1-$2   A-xyz   -
+
+# pattern modifier flags should propagate into returned (??{}) pattern
+# p,d,l not tested
+
+/^(a)((??{"b"}))$/i    AB      y       $1-$2   A-B     -
+/^(A)((??{'B$'}))(\nC)$/m      AB\nC   y       $1-$2-$3        A-B-\nC -
+/^(A)((??{'.'}))(B)$/s A\nB    y       $1-$2-$3        A-\n-B  -
+/^(A) ((??{' .'}))(B)$/x       A B     y       $1-$2-$3        A- -B   -
+/^((??{'\d'}))$/a      \x{660} n       -       -
+/^(??{"s"})$/i \x{17F} y       -       -
+/^(??{"s"})$/ia        \x{17F} y       -       -
+/^(??{"s"})$/iaa       \x{17F} n       -       -
+/^(??{'\w'})$/u        \x{AA}  y       -       -
+
+# #113670 ensure any captures to the right are invalidated when CURLY
+# and CURLYM backtrack
+
+^(?:(X)?(\d)|(X)?(\d\d))$      X12     y       $1-$2-$3-$4     --X-12
+^(?:(XX)?(\d)|(XX)?(\d\d))$    XX12    y       $1-$2-$3-$4     --XX-12
+
+# rt 113770
+\A(?>\[(?:(?:)(?:R){1}|T|V?|A)\])\z    [A]     y       $&      [A]
+# rt 114068
+/( [^z] $ [^z]+)/xm    aa\nbb\ncc\n    y       $1      a\nbb\ncc\n
+
+# [perl #114220]
+/[\h]/ \x{A0}  y       $&      \xA0
+/[\H]/ \x{BF}  y       $&      \xBF
+/[\H]/ \x{A0}  n       -       -
+/[\H]/ \x{A1}  y       $&      \xA1
+
+[^\n]+ \nb     y       $&      b
+[^\n]+ a\n     y       $&      a
+
+# /a has no effect on properties
+(?a:\p{Any})   \x{100} y       $&      \x{100}
+(?aa:\p{Any})  \x{100} y       $&      \x{100}
+
+\w     \x{200C}        y       $&      \x{200C}
+\W     \x{200C}        n       -       -
+\w     \x{200D}        y       $&      \x{200D}
+\W     \x{200D}        n       -       -
+
+/^(?d:\xdf|_)*_/i      \x{17f}\x{17f}_ y       $&      \x{17f}\x{17f}_
+#
+# check that @-, @+ count chars, not bytes; especially if beginning of
+# string is not copied
+
+(\x{100})      \x{2000}\x{2000}\x{2000}\x{100} y       $-[0]:$-[1]:$+[0]:$+[1] 3:3:4:4
+
+^\R{2}$        \r\n\r\n        y       $&      \r\n\r\n
+
+/^\D{11}/a     \x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}    n       -       -
+/^\S{11}/a     \x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}    n       -       -
+/^\W{11}/a     \x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}\x{10FFFF}    n       -       -
+
+# [ perl #114272]
+\Vn    \xFFn/  y       $&      \xFFn
+
+# These mostly exercize various paths in the optimizer
+/(?l:a?\w)/    b       y       $&      b
+/(?l:a?\D)/    b       y       $&      b
+^_?[^\S_0-9]\w*\z      \t      y       $&      \t
+m?^xy\?$?      xy?     y       $&      xy?
+a?\X   a\x{100}        y       $&      a\x{100}
+a?\R   a\n     y       $&      a\n
+^a?\N$ a\n     y       $&      a
+\N?a   \na     y       $&      a
+/\s?\s/l       \t      y       $&      \t
+/\s?\d/l       3       y       $&      3
+/\s?\S/l       A       y       $&      A
+
+# check we have the right utf8ness as we switch back and forth between
+# patterns
+^(\x{100}|a)(??{ qr/.?\xF7/d}) a_\xF7  y       -       -
+
+# [perl #118375]
+/(a|(bc)){0,0}?xyz/    xyz     y       $&      xyz
+/( a | ( bc ) ) {0,0} ? xyz/x  xyz     y       $&      xyz
+
+/(a|(bc)){0,0}+xyz/    xyz     y       $&      xyz
+/( a | ( bc ) ) {0,0} + xyz/x  xyz     y       $&      xyz
+
+(A(*PRUNE)B|A(*PRUNE)C)        AC      n       -       -
+(A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C)     AC      n       -       -
+(A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D)     AC      n       -       -
+((A(*PRUNE)B|A(*PRUNE)C))      AC      n       -       -
+((A(*PRUNE)B|A(*PRUNE)D|A(*PRUNE)C))   AC      n       -       -
+((A(*PRUNE)B|A(*PRUNE)C|A(*PRUNE)D))   AC      n       -       -
+
+A+?(*THEN)BC   AAABC   y       $&      ABC
+A+?(*PRUNE)BC  AAABC   y       $&      ABC
+A+(*THEN)BC    AAABC   y       $&      AAABC
+A+(*PRUNE)BC   AAABC   y       $&      AAABC
+A+?(*THEN)BC(?{})      AAABC   y       $&      ABC
+A+?(*PRUNE)BC(?{})     AAABC   y       $&      ABC
+A+(*THEN)BC(?{})       AAABC   y       $&      AAABC
+A+(*PRUNE)BC(?{})      AAABC   y       $&      AAABC
+/[#]/  a#b     y       $&      #
+/[#]b/ a#b     y       $&      #b
+/[#]/x a#b     y       $&      #
+/[#]b/x        a#b     y       $&      #b
+/[#](?{})/x    a#b     y       $&      #
+/[#](??{'b'})/x        a#b     y       $&      #b
+/(?#)(?{})b/   a#b     y       $&      b
+/(?#)(??{'b'})/        a#b     y       $&      b
+/[(?#](?{})b/  a#b     y       $&      #b
+/[(?#](??{'b'})/       a#b     y       $&      #b
+/(?#)(?{})b/x  a#b     y       $&      b
+/(?#)(??{'b'})/x       a#b     y       $&      b
+
+# RT #119069: PCRE regression test: no segfault
+^(?=(a)){0}b(?1)       back    y       $&      ba
+# RT #119071: PCRE regression test: No warning of infinite regression
+(?:(a(*SKIP)b)){0}(?:(?1)|ac)  x       n       -       -
+# RT #119073: PCRE regression test: {0} => NOTHING optimization
+(?1)(?:(b)){0} b       y       $&      b
+# RT #120041
+^A*\z          y       $&      
+/\N* /x        ab      y       $&      ab               # Under /x was ignoring the '*'
+/\N (?#comment) * /x   ab      y       $&      ab      # likewise
+
+# RT #120600: Variable length lookbehind is not variable
+(?<W>a)(?<BB>(?=(?&W))(?<=(?&W)))(?&BB)        aa      y       $&      a       # test repeated recursive patterns
+
+# This group is from RT #121144
+/^\S+=/d       \x{3a3}=\x{3a0} y       $&      \x{3a3}=
+/^\S+=/u       \x{3a3}=\x{3a0} y       $&      \x{3a3}=
+
+# utf8 cache length panics
+\x{100}[xy]\x{100}{2}  \x{100}y\x{100}\x{100}  y       $&      \x{100}y\x{100}\x{100}
+\x{100}a{2,3}  \x{100}aaa      y       $&      \x{100}aaa
+^x?abc?de      abcde   y       $&      abcde
+
+'(?-m:^abc)'m  abcde   y       $&      abc
+'(?-m:^abc)'m  x\nabcde        n       -       -
+
+# RT #121248 - segfault
+/^[+]([^(]+)$/mi       li      n       -       -
+
+# RT #121299 - Inconsistent behavior with backreferences nested inside subpattern references
+/(.)((o)\1)(?2)/       fofof   y       $2      of
+/(.)(?2)((\1)(?4)(\1))/        fffffff y       $1      f
+/(.)(?2)((.)(?4)(\1))/ foffoff y       $2      off
+/^(.\2?)(.)(?1)$/      abcb    y       $2      b
+/^(.\1?)(?1)$/ aba     y       $1      a
+/^ (\3(?2)\3)? ((.)) (?1) $/x  aaba    y       $2      a
+/^ (a|\3(?1)\2|(?2)) ((b|c)(?4)?) (?1) (d(?1)) $/x     abbcdcabbda     y       $2      b
+
+# RT #121321 - perl 5.19.10 infinite loops on backrefs > number of capture buffers (npar) where npar>9
+/(a)\2/        a\2     c       -       Reference to nonexistent group in regex
+/(a)(b)\3/     ab\3    c       -       Reference to nonexistent group in regex
+/(a)(b)(c)\4/  abc\4   c       -       Reference to nonexistent group in regex
+/(a)(b)(c)(d)\5/       abcd\5  c       -       Reference to nonexistent group in regex
+/(a)(b)(c)(d)(e)\6/    abcde\6 c       -       Reference to nonexistent group in regex
+/(a)(b)(c)(d)(e)(f)\7/ abcdef\7        c       -       Reference to nonexistent group in regex
+/(a)(b)(c)(d)(e)(f)(g)(h)(i)\10/       abcdefghi\10    y       $&      abcdefghi\10
+/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)\11/    abcdefghij\11   y       $&      abcdefghij\11
+/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12/ abcdefghijk\12  y       $&      abcdefghijk\12
+/(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\13\14/   abcdefghijk\12\13\14    y       $&      abcdefghijk\12\13\14
+
+\d<(.*?)>      a<>     n       -       -
+[bcd].{2,3}aaaa        XbXaaaaa        y       -       -
+[bcd].{2,3}aaaa        Xb\x{100}aaaaa  y       -       -
+'\Awibble\z'm  wibble  y       -       -
+/(alias|status)es$/i   Statuses        y       $1      Status          # [perl #121778]
+/( (?&solution) | % ) \Z (?(DEFINE) (?<solution>7\%\ solution) )/x     7% solution     y       $1      7% solution             # [perl #122890]
+(.)(?{$~=$^N}) \x{100} y       $~      \x{100}         # [perl #123135]
+
+/[a-z]/i       \N{KELVIN SIGN} y       $&      \N{KELVIN SIGN}
+/[A-Z]/ia      \N{KELVIN SIGN} y       $&      \N{KELVIN SIGN}
+/[A-Z]/iaa     \N{KELVIN SIGN} n       -       -
+/[A-Z]/i       \N{LATIN SMALL LETTER LONG S}   y       $&      \N{LATIN SMALL LETTER LONG S}
+
+# RT #123840: these used to hang in re_intuit_start
+/w\zxy?\z/i    \x{100}a\x{80}a n       -       -
+/w\z\R\z/i     \x{100}a\x{80}a n       -       -
+
+/(a+){1}+a/    aaa     n       -       -               # [perl #125825]
+
+^((?(?=x)xb|ya)z)      xbz     y       $1      xbz
+^((?(?=x)xb|ya)z)      yaz     y       $1      yaz
+^((?(?!y)xb|ya)z)      xbz     y       $1      xbz
+^((?(?!y)xb|ya)z)      yaz     y       $1      yaz
+^((?(?!)xb|ya)z)       xbz     n       -       -
+^((?(?!)xb|ya)z)       yaz     y       $1      yaz             # [perl-126222]
+
+foo(*ACCEPT:foo)       foo     y       $::REGMARK      foo
+(foo(*ACCEPT:foo))     foo     y       $::REGMARK      foo
+A(*FAIL:foo)[BC]       A       n       $::REGERROR     foo
+# Keep these lines at the end of the file
 # vim: softtabstop=0 noexpandtab