([a-c]*)\1 abcabc y $1 abc
\1 - c - Reference to nonexistent group
\2 - c - Reference to nonexistent group
+\g1 - c - Reference to nonexistent group
+\g-1 - c - Reference to nonexistent or unclosed group
+\g{1} - c - Reference to nonexistent group
+\g{-1} - c - Reference to nonexistent or unclosed group
+\g0 - c - Reference to invalid group 0
+\g-0 - c - Reference to invalid group 0
+\g{0} - c - Reference to invalid group 0
+\g{-0} - c - Reference to invalid group 0
(a)|\1 a y - -
(a)|\1 x n - -
(a)|\2 - c - Reference to nonexistent group
((\3|b)\2(a)x)+ aaxabxbaxbbx n - -
((\3|b)\2(a)x)+ aaaxabaxbaaxbbax y $&-$1-$2-$3 bbax-bbax-b-a
((\3|b)\2(a)){2,} bbaababbabaaaaabbaaaabba y $&-$1-$2-$3 bbaaaabba-bba-b-a
+#Bug #3589 - up to perl-5.6.0 matches incorrectly, from 5.6.1 not anymore
+^((.)?a\2)+$ babadad n - -
(a)|(b) b y $-[0] 0
(a)|(b) b y $+[0] 1
(a)|(b) b y x$-[1] x
.*\z foo\n y - -
^(?:(\d)x)?\d$ 1 y ${\(defined($1)?1:0)} 0
+.*?(?:(\w)|(\w))x abx y $1-$2 b-