perl

 view release on metacpan or  search on metacpan

t/re/re_tests  view on Meta::CPAN

a([bc]*)(c*d)	abcd	y	$-[1]	1
a([bc]*)(c*d)	abcd	y	$+[1]	3
a([bc]*)(c*d)	abcd	y	$-[2]	3
a([bc]*)(c*d)	abcd	y	$+[2]	4
a([bc]+)(c*d)	abcd	y	$&-$1-$2	abcd-bc-d
a([bc]*)(c+d)	abcd	y	$&-$1-$2	abcd-b-cd
a([bc]*)(c+d)	abcd	y	$-[0]	0
a([bc]*)(c+d)	abcd	y	$+[0]	4
a([bc]*)(c+d)	abcd	y	$-[1]	1
a([bc]*)(c+d)	abcd	y	$+[1]	2
a([bc]*)(c+d)	abcd	y	$-[2]	2
a([bc]*)(c+d)	abcd	y	$+[2]	4
a[bcd]*dcdcde	adcdcde	y	$&	adcdcde
a[bcd]+dcdcde	adcdcde	n	-	-
(ab|a)b*c	abc	y	$&-$1	abc-ab
(ab|a)b*c	abc	y	$-[0]	0
(ab|a)b*c	abc	y	$+[0]	3
(ab|a)b*c	abc	y	$-[1]	0
(ab|a)b*c	abc	y	$+[1]	2
((a)(b)c)(d)	abcd	y	$1-$2-$3-$4	abc-a-b-d
((a)(b)c)(d)	abcd	y	$-[0]	0
((a)(b)c)(d)	abcd	y	$+[0]	4
((a)(b)c)(d)	abcd	y	$-[1]	0
((a)(b)c)(d)	abcd	y	$+[1]	3
((a)(b)c)(d)	abcd	y	$-[2]	0
((a)(b)c)(d)	abcd	y	$+[2]	1
((a)(b)c)(d)	abcd	y	$-[3]	1
((a)(b)c)(d)	abcd	y	$+[3]	2
((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
(bc+d$|ef*g.|h?i(j|k))	effg	n	-	-
(bc+d$|ef*g.|h?i(j|k))	bcdd	n	-	-
(bc+d$|ef*g.|h?i(j|k))	reffgz	y	$&-$1-$2	effgz-effgz-
((((((((((a))))))))))	a	y	$10	a
((((((((((a))))))))))	a	y	$-[0]	0
((((((((((a))))))))))	a	y	$+[0]	1
((((((((((a))))))))))	a	y	$-[10]	0
((((((((((a))))))))))	a	y	$+[10]	1
((((((((((a))))))))))\10	aa	y	$&	aa
((((((((((a))))))))))${bang}	aa	n	-	-
((((((((((a))))))))))${bang}	a!	y	$&	a!
(((((((((a)))))))))	a	y	$&	a
[89]+	1((((((7(9))))))	y	-	-
multiple words of text	uh-uh	n	-	-
multiple words	multiple words, yeah	y	$&	multiple words
(.*)c(.*)	abcde	y	$&-$1-$2	abcde-ab-de
\((.*), (.*)\)	(a, b)	y	($2, $1)	(b, a)
[k]	ab	n	-	-
abcd	abcd	y	$&-\$&-\\$&	abcd-\$&-\\abcd
a(bc)d	abcd	y	$1-\$1-\\$1	bc-\$1-\\bc
a[-]?c	ac	y	$&	ac
(abc)\1	abcabc	y	$1	abc
([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 group
\g{-1}	-	c	-	Reference to nonexistent or unclosed 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
\g{-0}	-	c	-	Reference to invalid group 0
\g{ -0 }	-	c	-	Reference to invalid group 0
(a)|\1	a	y	-	-
(a)|\1	x	n	-	Reference to group in different branch
(?:(b)?a)\1	a	n	-	Reference to group that did not match
(a)|\2	-	c	-	Reference to nonexistent group
(([a-c])b*?\2)*	ababbbcbc	y	$&-$1-$2	ababb-bb-b
(([a-c])b*?\2){3}	ababbbcbc	y	$&-$1-$2	ababbbcbc-cbc-c
((\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
(a)|(b)	b	y	x$+[1]	x
(a)|(b)	b	y	$-[2]	0
(a)|(b)	b	y	$+[2]	1
'abc'i	ABC	y	$&	ABC
'abc'i	XBC	n	-	-
'abc'i	AXC	n	-	-
'abc'i	ABX	n	-	-
'abc'i	XABCY	y	$&	ABC
'abc'i	ABABC	y	$&	ABC
'ab*c'i	ABC	y	$&	ABC
'ab*bc'i	ABC	y	$&	ABC
'ab*bc'i	ABBC	y	$&	ABBC
'ab*?bc'i	ABBBBC	y	$&	ABBBBC
'ab{0,}?bc'i	ABBBBC	y	$&	ABBBBC
'ab+?bc'i	ABBC	y	$&	ABBC
'ab+bc'i	ABC	n	-	-
'ab+bc'i	ABQ	n	-	-
'ab{1,}bc'i	ABQ	n	-	-
'ab+bc'i	ABBBBC	y	$&	ABBBBC
'ab{1,}?bc'i	ABBBBC	y	$&	ABBBBC
'ab{1,3}?bc'i	ABBBBC	y	$&	ABBBBC
'ab{3,4}?bc'i	ABBBBC	y	$&	ABBBBC
'ab{4,5}?bc'i	ABBBBC	n	-	-
'ab??bc'i	ABBC	y	$&	ABBC
'ab??bc'i	ABC	y	$&	ABC
'ab{0,1}?bc'i	ABC	y	$&	ABC
'ab??bc'i	ABBBBC	n	-	-
'ab??c'i	ABC	y	$&	ABC
'ab{0,1}?c'i	ABC	y	$&	ABC
'^abc$'i	ABC	y	$&	ABC
'^abc$'i	ABCC	n	-	-
'^abc'i	ABCC	y	$&	ABC
'^abc$'i	AABC	n	-	-
'abc$'i	AABC	y	$&	ABC
'^'i	ABC	y	$&	
'$'i	ABC	y	$&	
'a.c'i	ABC	y	$&	ABC
'a.c'i	AXC	y	$&	AXC
'a\Nc'i	ABC	y	$&	ABC
'a.*?c'i	AXYZC	y	$&	AXYZC
'a.*c'i	AXYZD	n	-	-
'a[bc]d'i	ABC	n	-	-
'a[bc]d'i	ABD	y	$&	ABD
'a[b-d]e'i	ABD	n	-	-
'a[b-d]e'i	ACE	y	$&	ACE
'a[b-d]'i	AAC	y	$&	AC

t/re/re_tests  view on Meta::CPAN

foo(?:aA)++b	fooaAaAaAaAaAb	y	$&	fooaAaAaAaAaAb
foo(aA)++b	fooaAaAaAaAaAb	y	$&	fooaAaAaAaAaAb
foo(aA|bB)++b	foobBaAbBaAbBb	y	$&	foobBaAbBaAbBb
foo(?:aA|bB)++b	fooaAaAbBaAaAb	y	$&	fooaAaAbBaAaAb
foo(?:aA)*+b	fooaAaAaAaAaAb	y	$&	fooaAaAaAaAaAb
foo(aA)*+b	fooaAaAaAaAaAb	y	$&	fooaAaAaAaAaAb
foo(aA|bB)*+b	foobBbBaAaAaAb	y	$&	foobBbBaAaAaAb
foo(?:aA|bB)*+b	foobBaAaAbBaAb	y	$&	foobBaAaAbBaAb
foo(?:aA){1,5}+b	fooaAaAaAaAaAb	y	$&	fooaAaAaAaAaAb
foo(aA){1,5}+b	fooaAaAaAaAaAb	y	$&	fooaAaAaAaAaAb
foo(aA|bB){1,5}+b	foobBaAaAaAaAb	y	$&	foobBaAaAaAaAb
foo(?:aA|bB){1,5}+b	fooaAbBaAbBbBb	y	$&	fooaAbBaAbBbBb
foo(?:aA)?+b	fooaAb	y	$&	fooaAb
foo(aA)?+b	fooaAb	y	$&	fooaAb
foo(aA|bB)?+b	foobBb	y	$&	foobBb
foo(?:aA|bB)?+b	foobBb	y	$&	foobBb

([^()]++|\([^()]*\))+	((abc(ade)ufh()()x	y	$&	abc(ade)ufh()()x
round\(([^()]++)\)	_I(round(xs * sz),1)	y	$1	xs * sz

(foo[1x]|bar[2x]|baz[3x])+y	foo1bar2baz3y	y	$1	baz3
(foo[1x]|bar[2x]|baz[3x])+y	foo1bar2baz3y	y	$&	foo1bar2baz3y
(foo[1x]|bar[2x]|baz[3x])*y	foo1bar2baz3y	y	$1	baz3
(foo[1x]|bar[2x]|baz[3x])*y	foo1bar2baz3y	y	$&	foo1bar2baz3y

([yX].|WORDS|[yX].|WORD)S	WORDS	y	$1	WORD
(WORDS|WORLD|WORD)S	WORDS	y	$1	WORD
([yX].|WORDS|WORD|[xY].)S	WORDS	y	$1	WORD
(foo|fool|[zx].|money|parted)$	fool	y	$1	fool
([zx].|foo|fool|[zq].|money|parted|[yx].)$	fool	y	$1	fool
(foo|fool|[zx].|money|parted)$	fools	n	-	-
([zx].|foo|fool|[qx].|money|parted|[py].)$	fools	n	-	-

([yX].|WORDS|[yX].|WORD)+S	WORDS	y	$1	WORD
(WORDS|WORLD|WORD)+S	WORDS	y	$1	WORD
([yX].|WORDS|WORD|[xY].)+S	WORDS	y	$1	WORD
(foo|fool|[zx].|money|parted)+$	fool	y	$1	fool
([zx].|foo|fool|[zq].|money|parted|[yx].)+$	fool	y	$1	fool
(foo|fool|[zx].|money|parted)+$	fools	n	-	-
([zx].|foo|fool|[qx].|money|parted|[py].)+$	fools	n	-	-

(x|y|z[QW])+(longish|loquatious|excessive|overblown[QW])+	xyzQzWlongishoverblownW	y	$1-$2	zW-overblownW
(x|y|z[QW])*(longish|loquatious|excessive|overblown[QW])*	xyzQzWlongishoverblownW	y	$1-$2	zW-overblownW
(x|y|z[QW]){1,5}(longish|loquatious|excessive|overblown[QW]){1,5}	xyzQzWlongishoverblownW	y	$1-$2	zW-overblownW

(x|y|z[QW])++(longish|loquatious|excessive|overblown[QW])++	xyzQzWlongishoverblownW	y	$1-$2	zW-overblownW
(x|y|z[QW])*+(longish|loquatious|excessive|overblown[QW])*+	xyzQzWlongishoverblownW	y	$1-$2	zW-overblownW
(x|y|z[QW]){1,5}+(longish|loquatious|excessive|overblown[QW]){1,5}+	xyzQzWlongishoverblownW	y	$1-$2	zW-overblownW

a*(?!)	aaaab	n	-	-
a*(*FAIL)	aaaab	n	-	-
a*(*F)	aaaab	n	-	-

(A(A|B(*ACCEPT)|C)D)(E)	AB	y	$1	AB
(A(A|B(*ACCEPT)|C)D)(E)	ACDE	y	$1$2$3	ACDCE

(a)(?:(?-1)|(?+1))(b)	aab	y	$&-$1-$2	aab-a-b
(a)(?:(?-1)|(?+1))(b)	abb	y	$1-$2	a-b
(a)(?:(?-1)|(?+1))(b)	acb	n	-	-

(foo)(\g-2)	foofoo	y	$1-$2	foo-foo
(foo)(\g-2)(foo)(\g-2)	foofoofoofoo	y	$1-$2-$3-$4	foo-foo-foo-foo
(([abc]+) \g-1)(([abc]+) \g{-1})	abc abccba cba	y	$2-$4	abc-cba
(a)(b)(c)\g1\g2\g3	abcabc	y	$1$2$3	abc

# \k<n> preceded by a literal
/(?'n'foo) \k<n>/	..foo foo..	y	$1	foo
/(?'n'foo) \k<n>/	..foo foo..	yM	$+{n}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?<n>foo) \k'n'/	..foo foo..	y	$1	foo
/(?<n>foo) \k'n'/	..foo foo..	yM	$+{n}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?'a1'foo) \k'a1'/	..foo foo..	yM	$+{a1}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?<a1>foo) \k<a1>/	..foo foo..	yM	$+{a1}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?'_'foo) \k'_'/	..foo foo..	yM	$+{_}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?<_>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/	-	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
/(?<as>as) (\w+) \k{as} (\w+)/	as easy as pie	y	$1-$2-$3	as-easy-pie
/(?<as>as) (\w+) \k'as' (\w+)/	as easy as pie	y	$1-$2-$3	as-easy-pie
/(?<as>as) (\w+) \k{ as } (\w+)/	as easy as pie	y	$1-$2-$3	as-easy-pie
/(?<as>as) (\w+) \k< as> (\w+)/	as easy as pie	c	-	Group name must start with a non-digit word character

# \g{...} with a name as the argument 
/(?'n'foo) \g{n}/	..foo foo..	y	$1	foo
/(?'n'foo) \g{ n }/	..foo foo..	y	$1	foo
/(?'n'foo) \g{n}/	..foo foo..	yM	$+{n}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?<n>foo) \g{n}/	..foo foo..	y	$1	foo
/(?<n>foo) \g{n}/	..foo foo..	yM	$+{n}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?<as>as) (\w+) \g{as} (\w+)/	as easy as pie	y	$1-$2-$3	as-easy-pie

# Python style named capture buffer stuff
/(?P<n>foo)(?P=n)/	..foofoo..	y	$1	foo
/(?P<n>foo)(?P=n)/	..foofoo..	yM	$+{n}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?:(?P<n>foo)|(?P<n>bar))(?P=n)/	..barbar..	yM	$+{n}	bar	miniperl cannot load Tie::Hash::NamedCapture
/^(?P<PAL>(?P<CHAR>.)((?P>PAL)|.?)(?P=CHAR))$/	madamimadam	y	$&	madamimadam
/^(?P<PAL>(?P<CHAR>.)((?P>PAL)|.?)(?P=CHAR))$/	madamiamadam	n	-	-
/(?P<n>foo) (?P=n)/	..foo foo..	y	$1	foo
/(?P<n>foo) (?P=n)/	..foo foo..	yM	$+{n}	foo	miniperl cannot load Tie::Hash::NamedCapture
/(?P<as>as) (\w+) (?P=as) (\w+)/	as easy as pie	y	$1-$2-$3	as-easy-pie

#check that non identifiers as names are treated as the appropriate lookaround
(?<=bar>)foo	bar>foo	y	$&	foo
(?<!bar>)foo	bar>foo	n	-	-
(?<=bar>ABC)foo	bar>ABCfoo	y	$&	foo
(?<!bar>ABC)foo	bar>ABCfoo	n	-	-
(?<bar>)foo	bar>ABCfoo	y	$&	foo
(?<bar>ABC)foo	bar>ABCfoo	y	$&	ABCfoo

(?<=abcd(?<=(aaaabcd)))	..aaaabcd..	y	$1	aaaabcd
(?=xy(?<=(aaxy)))	..aaxy..	y	$1	aaxy
(?=xy(?<=(aaxyz?)))	..aaxy..	y	$1	aaxy

X(\w+)(?=\s)|X(\w+)	Xab	y	[$1-$2]	[-ab]

#check that branch reset works ok.
(?|(a))	a	y	$1-$+-$^N	a-a-a
(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)	d!o!da	y	$1-$2-$3	!o!-o-a
(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)	aabc	y	$1-$2-$3	a--c
(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)	ixyjp	y	$1-$2-$3	x-y-p
(?|(?|(a)|(b))|(?|(c)|(d)))	a	y	$1	a
(?|(?|(a)|(b))|(?|(c)|(d)))	b	y	$1	b
(?|(?|(a)|(b))|(?|(c)|(d)))	c	y	$1	c
(?|(?|(a)|(b))|(?|(c)|(d)))	d	y	$1	d
(.)(?|(.)(.)x|(.)d)(.)	abcde	y	$1-$2-$3-$4-$5-	b-c--e--
(\N)(?|(\N)(\N)x|(\N)d)(\N)	abcde	y	$1-$2-$3-$4-$5-	b-c--e--
(?|(?<foo>x))	x	yM	$+{foo}	x	miniperl cannot load Tie::Hash::NamedCapture
(?|(?<foo>x)|(?<bar>y))	x	yM	$+{foo}	x	miniperl cannot load Tie::Hash::NamedCapture
(?|(?<bar>y)|(?<foo>x))	x	yM	$+{foo}	x	miniperl cannot load Tie::Hash::NamedCapture
(?<bar>)(?|(?<foo>x))	x	yM	$+{foo}	x	miniperl cannot load Tie::Hash::NamedCapture
# Used to crash, because the last branch was ignored when the parens
# were counted:
(?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(...

#Bug #41492
(?(DEFINE)(?<A>(?&B)+)(?<B>a))(?&A)	a	y	$&	a
(?(DEFINE)(?<A>(?&B)+)(?<B>a))(?&A)	aa	y	$&	aa
\x{100}?(??{""})xxx	xxx	y	$&	xxx

foo(\R)bar	foo\r\nbar	y	$1	\r\n
foo(\R)bar	foo\nbar	y	$1	\n
foo(\R)bar	foo\rbar	y	$1	\r

foo(\R+)bar	foo\r\n\x{85}\r\n\nbar	y	$1	\r\n\x{85}\r\n\n
(\V+)(\R)	foo\r\n\x{85}\r\n\nbar	y	$1-$2	foo-\r\n
(\R+)(\V)	foo\r\n\x{85}\r\n\nbar	y	$1-$2	\r\n\x{85}\r\n\n-b
foo(\R)bar	foo\x{85}bar	y	$1	\x{85}
(\V)(\R)	foo\x{85}bar	y	$1-$2	o-\x{85}
(\R)(\V)	foo\x{85}bar	y	$1-$2	\x{85}-b
foo(\R)bar	foo\r\nbar	y	$1	\r\n

t/re/re_tests  view on Meta::CPAN

\N{U+4AG3}	-	c	-	Invalid hexadecimal number
[\N{U+4AG3}]	-	c	-	Invalid hexadecimal number
abc\N{def}	-	c	-	Unknown charname 'def' in regex
abc\N{U+4AG3	-	c	-	Missing right brace on \\N{}
abc\N{def	-	c	-	Missing right brace on \\N{}
abc\N{	-	c	-	Missing right brace on \\N{}

# Verify that under /x that still cant have space before left brace
/abc\N {U+41}/x	-	c	-	Missing braces
/abc\N {SPACE}/x	-	c	-	Missing braces

# Verifies catches hex errors
/\N{U+0xBEEF}/	-	c	-	Invalid hexadecimal number
\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	-	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}
[a\400]	\x{100}	y	$&	\x{100}
[b\600]	\x{180}	y	$&	\x{180}
[c\777]	\x{1FF}	y	$&	\x{1FF}
\o{120}	\x{50}	y	$&	\x{50}
\o{400}	\x{100}	y	$&	\x{100}
\o{1000}	\x{200}	y	$&	\x{200}
[a\o{120}]	\x{50}	y	$&	\x{50}
[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{ 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	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	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
[\0005]	5\000	y	$&	5
[\_]	_	y	$&	_

# RT #79152
(q1|.)*(q2|.)*(x(a|bc)*y){2,}	xayxay	y	$&	xayxay
(q1|.)*(q2|.)*(x(a|bc)*y){2,3}	xayxay	y	$&	xayxay
(q1|z)*(q2|z)*z{15}-.*?(x(a|bc)*y){2,3}Z	zzzzzzzzzzzzzzzz-xayxayxayxayZ	y	$&	zzzzzzzzzzzzzzzz-xayxayxayxayZ

(?:(?:)foo|bar|zot|rt78356)	foo	y	$&	foo
/\xe0\pL/i	\xc0a	y	$&	\xc0a

# RT #85528
(?{})[\x{100}]	\x{100}	y	$&	\x{100}

# RT #85964
^m?(\S)(.*)\1$	aba	y	$1	a
^m?(\S)(.*)\1$	\tb\t	n	-	-
^m?(\s)(.*)\1$	\tb\t	y	$1	\t
^m?(\s)(.*)\1$	aba	n	-	-
^m?(\W)(.*)\1$	:b:	y	$1	:
^m?(\W)(.*)\1$	aba	n	-	-
^m?(\w)(.*)\1$	aba	y	$1	a
^m?(\w)(.*)\1$	:b:	n	-	-
^m?(\D)(.*)\1$	aba	y	$1	a
^m?(\D)(.*)\1$	5b5	n	-	-
^m?(\d)(.*)\1$	5b5	y	$1	5
^m?(\d)(.*)\1$	aba	n	-	-

^_?[^\W_0-9]\w\z	\xAA\x{100}	y	$&	\xAA\x{100}		[perl #127537]



( run in 0.831 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )