This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Allow negative indexing in recursive patterns
[perl5.git] / t / op / re_tests
CommitLineData
378cc40b 1abc abc y $& abc
301f462a
MJD
2abc abc y $-[0] 0
3abc abc y $+[0] 3
378cc40b
LW
4abc xbc n - -
5abc axc n - -
6abc abx n - -
7abc xabcy y $& abc
301f462a
MJD
8abc xabcy y $-[0] 1
9abc xabcy y $+[0] 4
378cc40b 10abc ababc y $& abc
301f462a
MJD
11abc ababc y $-[0] 2
12abc ababc y $+[0] 5
378cc40b 13ab*c abc y $& abc
301f462a
MJD
14ab*c abc y $-[0] 0
15ab*c abc y $+[0] 3
378cc40b 16ab*bc abc y $& abc
301f462a
MJD
17ab*bc abc y $-[0] 0
18ab*bc abc y $+[0] 3
378cc40b 19ab*bc abbc y $& abbc
301f462a
MJD
20ab*bc abbc y $-[0] 0
21ab*bc abbc y $+[0] 4
378cc40b 22ab*bc abbbbc y $& abbbbc
301f462a
MJD
23ab*bc abbbbc y $-[0] 0
24ab*bc abbbbc y $+[0] 6
c277df42 25.{1} abbbbc y $& a
301f462a
MJD
26.{1} abbbbc y $-[0] 0
27.{1} abbbbc y $+[0] 1
c277df42 28.{3,4} abbbbc y $& abbb
301f462a
MJD
29.{3,4} abbbbc y $-[0] 0
30.{3,4} abbbbc y $+[0] 4
a687059c 31ab{0,}bc abbbbc y $& abbbbc
301f462a
MJD
32ab{0,}bc abbbbc y $-[0] 0
33ab{0,}bc abbbbc y $+[0] 6
378cc40b 34ab+bc abbc y $& abbc
301f462a
MJD
35ab+bc abbc y $-[0] 0
36ab+bc abbc y $+[0] 4
378cc40b
LW
37ab+bc abc n - -
38ab+bc abq n - -
a687059c 39ab{1,}bc abq n - -
378cc40b 40ab+bc abbbbc y $& abbbbc
301f462a
MJD
41ab+bc abbbbc y $-[0] 0
42ab+bc abbbbc y $+[0] 6
a687059c 43ab{1,}bc abbbbc y $& abbbbc
301f462a
MJD
44ab{1,}bc abbbbc y $-[0] 0
45ab{1,}bc abbbbc y $+[0] 6
a687059c 46ab{1,3}bc abbbbc y $& abbbbc
301f462a
MJD
47ab{1,3}bc abbbbc y $-[0] 0
48ab{1,3}bc abbbbc y $+[0] 6
a687059c 49ab{3,4}bc abbbbc y $& abbbbc
301f462a
MJD
50ab{3,4}bc abbbbc y $-[0] 0
51ab{3,4}bc abbbbc y $+[0] 6
a687059c 52ab{4,5}bc abbbbc n - -
378cc40b
LW
53ab?bc abbc y $& abbc
54ab?bc abc y $& abc
a687059c 55ab{0,1}bc abc y $& abc
378cc40b
LW
56ab?bc abbbbc n - -
57ab?c abc y $& abc
a687059c 58ab{0,1}c abc y $& abc
378cc40b
LW
59^abc$ abc y $& abc
60^abc$ abcc n - -
61^abc abcc y $& abc
62^abc$ aabc n - -
63abc$ aabc y $& abc
c277df42 64abc$ aabcd n - -
378cc40b
LW
65^ abc y $&
66$ abc y $&
67a.c abc y $& abc
68a.c axc y $& axc
69a.*c axyzc y $& axyzc
70a.*c axyzd n - -
71a[bc]d abc n - -
72a[bc]d abd y $& abd
3b968408
YO
73a[b]d abd y $& abd
74[a][b][d] abd y $& abd
75.[b]. abd y $& abd
76.[b]. aBd n - -
77(?i:.[b].) abd y $& abd
378cc40b
LW
78a[b-d]e abd n - -
79a[b-d]e ace y $& ace
80a[b-d] aac y $& ac
81a[-b] a- y $& a-
82a[b-] a- y $& a-
b2a156bd 83a[b-a] - c - Invalid [] range \"b-a\"
24b61696
RK
84a[]b - c - Unmatched [
85a[ - c - Unmatched [
378cc40b
LW
86a] a] y $& a]
87a[]]b a]b y $& a]b
88a[^bc]d aed y $& aed
89a[^bc]d abd n - -
90a[^-b]c adc y $& adc
91a[^-b]c a-c n - -
92a[^]b]c a]c n - -
93a[^]b]c adc y $& adc
bbce6d69
PP
94\ba\b a- y - -
95\ba\b -a y - -
96\ba\b -a- y - -
97\by\b xy n - -
98\by\b yz n - -
99\by\b xyz n - -
100\Ba\B a- n - -
101\Ba\B -a n - -
102\Ba\B -a- n - -
103\By\b xy y - -
301f462a
MJD
104\By\b xy y $-[0] 1
105\By\b xy y $+[0] 2
106\By\b xy y - -
bbce6d69
PP
107\by\B yz y - -
108\By\B xyz y - -
109\w a y - -
110\w - n - -
111\W a n - -
112\W - y - -
113a\sb a b y - -
114a\sb a-b n - -
115a\Sb a b n - -
116a\Sb a-b y - -
117\d 1 y - -
118\d - n - -
119\D 1 n - -
120\D - y - -
121[\w] a y - -
122[\w] - n - -
123[\W] a n - -
124[\W] - y - -
125a[\s]b a b y - -
126a[\s]b a-b n - -
127a[\S]b a b n - -
128a[\S]b a-b y - -
129[\d] 1 y - -
130[\d] - n - -
131[\D] 1 n - -
132[\D] - y - -
378cc40b
LW
133ab|cd abc y $& ab
134ab|cd abcd y $& ab
135()ef def y $&-$1 ef-
301f462a
MJD
136()ef def y $-[0] 1
137()ef def y $+[0] 3
138()ef def y $-[1] 1
139()ef def y $+[1] 1
24b61696 140*a - c - Quantifier follows nothing
e2e6a0f1
YO
141(|*)b - c - Quantifier follows nothing
142(*)b - c - Unknown verb
378cc40b 143$b b n - -
1b1626e4 144a\ - c - Search pattern not terminated
378cc40b
LW
145a\(b a(b y $&-$1 a(b-
146a\(*b ab y $& ab
147a\(*b a((b y $& a((b
b2a156bd 148a\\b a\\b y $& a\\b
24b61696
RK
149abc) - c - Unmatched )
150(abc - c - Unmatched (
378cc40b 151((a)) abc y $&-$1-$2 a-a-a
301f462a
MJD
152((a)) abc y $-[0]-$-[1]-$-[2] 0-0-0
153((a)) abc y $+[0]-$+[1]-$+[2] 1-1-1
154((a)) abc b @- 0 0 0
155((a)) abc b @+ 1 1 1
378cc40b 156(a)b(c) abc y $&-$1-$2 abc-a-c
301f462a
MJD
157(a)b(c) abc y $-[0]-$-[1]-$-[2] 0-0-2
158(a)b(c) abc y $+[0]-$+[1]-$+[2] 3-1-3
378cc40b 159a+b+c aabbabc y $& abc
a687059c 160a{1,}b{1,}c aabbabc y $& abc
24b61696 161a** - c - Nested quantifiers
a0d0e21e 162a.+?c abcabc y $& abc
378cc40b 163(a+|b)* ab y $&-$1 ab-b
301f462a
MJD
164(a+|b)* ab y $-[0] 0
165(a+|b)* ab y $+[0] 2
166(a+|b)* ab y $-[1] 1
167(a+|b)* ab y $+[1] 2
a687059c 168(a+|b){0,} ab y $&-$1 ab-b
378cc40b 169(a+|b)+ ab y $&-$1 ab-b
a687059c 170(a+|b){1,} ab y $&-$1 ab-b
378cc40b 171(a+|b)? ab y $&-$1 a-a
a687059c 172(a+|b){0,1} ab y $&-$1 a-a
24b61696 173)( - c - Unmatched )
378cc40b
LW
174[^ab]* cde y $& cde
175abc n - -
176a* y $&
177([abc])*d abbbcd y $&-$1 abbbcd-c
178([abc])*bcd abcd y $&-$1 abcd-a
179a|b|c|d|e e y $& e
180(a|b|c|d|e)f ef y $&-$1 ef-e
301f462a
MJD
181(a|b|c|d|e)f ef y $-[0] 0
182(a|b|c|d|e)f ef y $+[0] 2
183(a|b|c|d|e)f ef y $-[1] 0
184(a|b|c|d|e)f ef y $+[1] 1
378cc40b
LW
185abcd*efg abcdefg y $& abcdefg
186ab* xabyabbbz y $& ab
187ab* xayabbbz y $& a
188(ab|cd)e abcde y $&-$1 cde-cd
189[abhgefdc]ij hij y $& hij
190^(ab|cd)e abcde n x$1y xy
191(abc|)ef abcdef y $&-$1 ef-
192(a|b)c*d abcd y $&-$1 bcd-b
193(ab|ab*)bc abc y $&-$1 abc-a
194a([bc]*)c* abc y $&-$1 abc-bc
195a([bc]*)(c*d) abcd y $&-$1-$2 abcd-bc-d
301f462a
MJD
196a([bc]*)(c*d) abcd y $-[0] 0
197a([bc]*)(c*d) abcd y $+[0] 4
198a([bc]*)(c*d) abcd y $-[1] 1
199a([bc]*)(c*d) abcd y $+[1] 3
200a([bc]*)(c*d) abcd y $-[2] 3
201a([bc]*)(c*d) abcd y $+[2] 4
378cc40b
LW
202a([bc]+)(c*d) abcd y $&-$1-$2 abcd-bc-d
203a([bc]*)(c+d) abcd y $&-$1-$2 abcd-b-cd
301f462a
MJD
204a([bc]*)(c+d) abcd y $-[0] 0
205a([bc]*)(c+d) abcd y $+[0] 4
206a([bc]*)(c+d) abcd y $-[1] 1
207a([bc]*)(c+d) abcd y $+[1] 2
208a([bc]*)(c+d) abcd y $-[2] 2
209a([bc]*)(c+d) abcd y $+[2] 4
378cc40b
LW
210a[bcd]*dcdcde adcdcde y $& adcdcde
211a[bcd]+dcdcde adcdcde n - -
212(ab|a)b*c abc y $&-$1 abc-ab
301f462a
MJD
213(ab|a)b*c abc y $-[0] 0
214(ab|a)b*c abc y $+[0] 3
215(ab|a)b*c abc y $-[1] 0
216(ab|a)b*c abc y $+[1] 2
378cc40b 217((a)(b)c)(d) abcd y $1-$2-$3-$4 abc-a-b-d
301f462a
MJD
218((a)(b)c)(d) abcd y $-[0] 0
219((a)(b)c)(d) abcd y $+[0] 4
220((a)(b)c)(d) abcd y $-[1] 0
221((a)(b)c)(d) abcd y $+[1] 3
222((a)(b)c)(d) abcd y $-[2] 0
223((a)(b)c)(d) abcd y $+[2] 1
224((a)(b)c)(d) abcd y $-[3] 1
225((a)(b)c)(d) abcd y $+[3] 2
226((a)(b)c)(d) abcd y $-[4] 3
227((a)(b)c)(d) abcd y $+[4] 4
378cc40b
LW
228[a-zA-Z_][a-zA-Z0-9_]* alpha y $& alpha
229^a(bc+|b[eh])g|.h$ abh y $&-$1 bh-
230(bc+d$|ef*g.|h?i(j|k)) effgz y $&-$1-$2 effgz-effgz-
231(bc+d$|ef*g.|h?i(j|k)) ij y $&-$1-$2 ij-ij-j
232(bc+d$|ef*g.|h?i(j|k)) effg n - -
233(bc+d$|ef*g.|h?i(j|k)) bcdd n - -
234(bc+d$|ef*g.|h?i(j|k)) reffgz y $&-$1-$2 effgz-effgz-
fe14fcc3 235((((((((((a)))))))))) a y $10 a
301f462a
MJD
236((((((((((a)))))))))) a y $-[0] 0
237((((((((((a)))))))))) a y $+[0] 1
238((((((((((a)))))))))) a y $-[10] 0
239((((((((((a)))))))))) a y $+[10] 1
fe14fcc3 240((((((((((a))))))))))\10 aa y $& aa
9d116dd7
JH
241((((((((((a))))))))))${bang} aa n - -
242((((((((((a))))))))))${bang} a! y $& a!
378cc40b
LW
243(((((((((a))))))))) a y $& a
244multiple words of text uh-uh n - -
245multiple words multiple words, yeah y $& multiple words
246(.*)c(.*) abcde y $&-$1-$2 abcde-ab-de
247\((.*), (.*)\) (a, b) y ($2, $1) (b, a)
248[k] ab n - -
b2a156bd
DM
249abcd abcd y $&-\$&-\\$& abcd-\$&-\\abcd
250a(bc)d abcd y $1-\$1-\\$1 bc-\$1-\\bc
378cc40b
LW
251a[-]?c ac y $& ac
252(abc)\1 abcabc y $1 abc
253([a-c]*)\1 abcabc y $1 abc
9baa0206
HS
254\1 - c - Reference to nonexistent group
255\2 - c - Reference to nonexistent group
ef64f398
HS
256(a)|\1 a y - -
257(a)|\1 x n - -
9baa0206 258(a)|\2 - c - Reference to nonexistent group
ef64f398
HS
259(([a-c])b*?\2)* ababbbcbc y $&-$1-$2 ababb-bb-b
260(([a-c])b*?\2){3} ababbbcbc y $&-$1-$2 ababbbcbc-cbc-c
261((\3|b)\2(a)x)+ aaxabxbaxbbx n - -
262((\3|b)\2(a)x)+ aaaxabaxbaaxbbax y $&-$1-$2-$3 bbax-bbax-b-a
263((\3|b)\2(a)){2,} bbaababbabaaaaabbaaaabba y $&-$1-$2-$3 bbaaaabba-bba-b-a
301f462a
MJD
264(a)|(b) b y $-[0] 0
265(a)|(b) b y $+[0] 1
266(a)|(b) b y x$-[1] x
267(a)|(b) b y x$+[1] x
268(a)|(b) b y $-[2] 0
269(a)|(b) b y $+[2] 1
1462b684
LW
270'abc'i ABC y $& ABC
271'abc'i XBC n - -
272'abc'i AXC n - -
273'abc'i ABX n - -
274'abc'i XABCY y $& ABC
275'abc'i ABABC y $& ABC
276'ab*c'i ABC y $& ABC
277'ab*bc'i ABC y $& ABC
278'ab*bc'i ABBC y $& ABBC
a0d0e21e
LW
279'ab*?bc'i ABBBBC y $& ABBBBC
280'ab{0,}?bc'i ABBBBC y $& ABBBBC
281'ab+?bc'i ABBC y $& ABBC
1462b684
LW
282'ab+bc'i ABC n - -
283'ab+bc'i ABQ n - -
284'ab{1,}bc'i ABQ n - -
285'ab+bc'i ABBBBC y $& ABBBBC
a0d0e21e
LW
286'ab{1,}?bc'i ABBBBC y $& ABBBBC
287'ab{1,3}?bc'i ABBBBC y $& ABBBBC
288'ab{3,4}?bc'i ABBBBC y $& ABBBBC
289'ab{4,5}?bc'i ABBBBC n - -
290'ab??bc'i ABBC y $& ABBC
291'ab??bc'i ABC y $& ABC
292'ab{0,1}?bc'i ABC y $& ABC
293'ab??bc'i ABBBBC n - -
294'ab??c'i ABC y $& ABC
295'ab{0,1}?c'i ABC y $& ABC
1462b684
LW
296'^abc$'i ABC y $& ABC
297'^abc$'i ABCC n - -
298'^abc'i ABCC y $& ABC
299'^abc$'i AABC n - -
300'abc$'i AABC y $& ABC
301'^'i ABC y $&
302'$'i ABC y $&
303'a.c'i ABC y $& ABC
304'a.c'i AXC y $& AXC
a0d0e21e 305'a.*?c'i AXYZC y $& AXYZC
1462b684
LW
306'a.*c'i AXYZD n - -
307'a[bc]d'i ABC n - -
308'a[bc]d'i ABD y $& ABD
309'a[b-d]e'i ABD n - -
310'a[b-d]e'i ACE y $& ACE
311'a[b-d]'i AAC y $& AC
312'a[-b]'i A- y $& A-
313'a[b-]'i A- y $& A-
b2a156bd 314'a[b-a]'i - c - Invalid [] range \"b-a\"
24b61696
RK
315'a[]b'i - c - Unmatched [
316'a['i - c - Unmatched [
1462b684
LW
317'a]'i A] y $& A]
318'a[]]b'i A]B y $& A]B
319'a[^bc]d'i AED y $& AED
320'a[^bc]d'i ABD n - -
321'a[^-b]c'i ADC y $& ADC
322'a[^-b]c'i A-C n - -
323'a[^]b]c'i A]C n - -
324'a[^]b]c'i ADC y $& ADC
325'ab|cd'i ABC y $& AB
326'ab|cd'i ABCD y $& AB
327'()ef'i DEF y $&-$1 EF-
24b61696 328'*a'i - c - Quantifier follows nothing
e2e6a0f1
YO
329'(|*)b'i - c - Quantifier follows nothing
330'(*)b'i - c - Unknown verb
1462b684 331'$b'i B n - -
1b1626e4 332'a\'i - c - Search pattern not terminated
1462b684
LW
333'a\(b'i A(B y $&-$1 A(B-
334'a\(*b'i AB y $& AB
335'a\(*b'i A((B y $& A((B
b2a156bd 336'a\\b'i A\\B y $& A\\B
24b61696
RK
337'abc)'i - c - Unmatched )
338'(abc'i - c - Unmatched (
1462b684
LW
339'((a))'i ABC y $&-$1-$2 A-A-A
340'(a)b(c)'i ABC y $&-$1-$2 ABC-A-C
341'a+b+c'i AABBABC y $& ABC
342'a{1,}b{1,}c'i AABBABC y $& ABC
24b61696 343'a**'i - c - Nested quantifiers
a0d0e21e
LW
344'a.+?c'i ABCABC y $& ABC
345'a.*?c'i ABCABC y $& ABC
346'a.{0,5}?c'i ABCABC y $& ABC
1462b684
LW
347'(a+|b)*'i AB y $&-$1 AB-B
348'(a+|b){0,}'i AB y $&-$1 AB-B
349'(a+|b)+'i AB y $&-$1 AB-B
350'(a+|b){1,}'i AB y $&-$1 AB-B
351'(a+|b)?'i AB y $&-$1 A-A
352'(a+|b){0,1}'i AB y $&-$1 A-A
a0d0e21e 353'(a+|b){0,1}?'i AB y $&-$1 -
24b61696 354')('i - c - Unmatched )
1462b684
LW
355'[^ab]*'i CDE y $& CDE
356'abc'i n - -
357'a*'i y $&
358'([abc])*d'i ABBBCD y $&-$1 ABBBCD-C
359'([abc])*bcd'i ABCD y $&-$1 ABCD-A
360'a|b|c|d|e'i E y $& E
361'(a|b|c|d|e)f'i EF y $&-$1 EF-E
1462b684
LW
362'abcd*efg'i ABCDEFG y $& ABCDEFG
363'ab*'i XABYABBBZ y $& AB
364'ab*'i XAYABBBZ y $& A
365'(ab|cd)e'i ABCDE y $&-$1 CDE-CD
366'[abhgefdc]ij'i HIJ y $& HIJ
367'^(ab|cd)e'i ABCDE n x$1y XY
368'(abc|)ef'i ABCDEF y $&-$1 EF-
369'(a|b)c*d'i ABCD y $&-$1 BCD-B
370'(ab|ab*)bc'i ABC y $&-$1 ABC-A
371'a([bc]*)c*'i ABC y $&-$1 ABC-BC
372'a([bc]*)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
373'a([bc]+)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
374'a([bc]*)(c+d)'i ABCD y $&-$1-$2 ABCD-B-CD
375'a[bcd]*dcdcde'i ADCDCDE y $& ADCDCDE
376'a[bcd]+dcdcde'i ADCDCDE n - -
377'(ab|a)b*c'i ABC y $&-$1 ABC-AB
378'((a)(b)c)(d)'i ABCD y $1-$2-$3-$4 ABC-A-B-D
379'[a-zA-Z_][a-zA-Z0-9_]*'i ALPHA y $& ALPHA
380'^a(bc+|b[eh])g|.h$'i ABH y $&-$1 BH-
381'(bc+d$|ef*g.|h?i(j|k))'i EFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
382'(bc+d$|ef*g.|h?i(j|k))'i IJ y $&-$1-$2 IJ-IJ-J
383'(bc+d$|ef*g.|h?i(j|k))'i EFFG n - -
384'(bc+d$|ef*g.|h?i(j|k))'i BCDD n - -
385'(bc+d$|ef*g.|h?i(j|k))'i REFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
386'((((((((((a))))))))))'i A y $10 A
387'((((((((((a))))))))))\10'i AA y $& AA
9d116dd7
JH
388'((((((((((a))))))))))${bang}'i AA n - -
389'((((((((((a))))))))))${bang}'i A! y $& A!
1462b684 390'(((((((((a)))))))))'i A y $& A
a0d0e21e
LW
391'(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))'i A y $1 A
392'(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))'i C y $1 C
1462b684
LW
393'multiple words of text'i UH-UH n - -
394'multiple words'i MULTIPLE WORDS, YEAH y $& MULTIPLE WORDS
395'(.*)c(.*)'i ABCDE y $&-$1-$2 ABCDE-AB-DE
396'\((.*), (.*)\)'i (A, B) y ($2, $1) (B, A)
397'[k]'i AB n - -
b2a156bd
DM
398'abcd'i ABCD y $&-\$&-\\$& ABCD-\$&-\\ABCD
399'a(bc)d'i ABCD y $1-\$1-\\$1 BC-\$1-\\BC
1462b684
LW
400'a[-]?c'i AC y $& AC
401'(abc)\1'i ABCABC y $1 ABC
402'([a-c]*)\1'i ABCABC y $1 ABC
a0d0e21e
LW
403a(?!b). abad y $& ad
404a(?=d). abad y $& ad
405a(?=c|d). abad y $& ad
406a(?:b|c|d)(.) ace y $1 e
407a(?:b|c|d)*(.) ace y $1 e
408a(?:b|c|d)+?(.) ace y $1 e
c277df42
IZ
409a(?:b|c|d)+?(.) acdbcdbe y $1 d
410a(?:b|c|d)+(.) acdbcdbe y $1 e
411a(?:b|c|d){2}(.) acdbcdbe y $1 b
412a(?:b|c|d){4,5}(.) acdbcdbe y $1 b
413a(?:b|c|d){4,5}?(.) acdbcdbe y $1 d
414((foo)|(bar))* foobar y $1-$2-$3 bar-foo-bar
9baa0206 415:(?: - c - Sequence (? incomplete
c277df42
IZ
416a(?:b|c|d){6,7}(.) acdbcdbe y $1 e
417a(?:b|c|d){6,7}?(.) acdbcdbe y $1 e
418a(?:b|c|d){5,6}(.) acdbcdbe y $1 e
419a(?:b|c|d){5,6}?(.) acdbcdbe y $1 b
420a(?:b|c|d){5,7}(.) acdbcdbe y $1 e
421a(?:b|c|d){5,7}?(.) acdbcdbe y $1 b
a0d0e21e
LW
422a(?:b|(c|e){1,2}?|d)+?(.) ace y $1$2 ce
423^(.+)?B AB y $1 A
c277df42
IZ
424^([^a-z])|(\^)$ . y $1 .
425^[<>]& <&OUT y $& <&
426^(a\1?){4}$ aaaaaaaaaa y $1 aaaa
427^(a\1?){4}$ aaaaaaaaa n - -
428^(a\1?){4}$ aaaaaaaaaaa n - -
af3f8c16
IZ
429^(a(?(1)\1)){4}$ aaaaaaaaaa y $1 aaaa
430^(a(?(1)\1)){4}$ aaaaaaaaa n - -
431^(a(?(1)\1)){4}$ aaaaaaaaaaa n - -
708e3b05
IZ
432((a{4})+) aaaaaaaaa y $1 aaaaaaaa
433(((aa){2})+) aaaaaaaaaa y $1 aaaaaaaa
434(((a{2}){2})+) aaaaaaaaaa y $1 aaaaaaaa
c277df42
IZ
435(?:(f)(o)(o)|(b)(a)(r))* foobar y $1:$2:$3:$4:$5:$6 f:o:o:b:a:r
436(?<=a)b ab y $& b
437(?<=a)b cb n - -
438(?<=a)b b n - -
439(?<!c)b ab y $& b
440(?<!c)b cb n - -
441(?<!c)b b y - -
442(?<!c)b b y $& b
24b61696 443(?<%)b - c - Sequence (?<%...) not recognized
c277df42
IZ
444(?:..)*a aba y $& aba
445(?:..)*?a aba y $& a
446^(?:b|a(?=(.)))*\1 abc y $& ab
447^(){3,5} abc y a$1 a
448^(a+)*ax aax y $1 a
449^((a|b)+)*ax aax y $1 a
450^((a|bc)+)*ax aax y $1 a
451(a|x)*ab cab y y$1 y
452(a)*ab cab y y$1 y
453(?:(?i)a)b ab y $& ab
454((?i)a)b ab y $&:$1 ab:a
455(?:(?i)a)b Ab y $& Ab
456((?i)a)b Ab y $&:$1 Ab:A
457(?:(?i)a)b aB n - -
458((?i)a)b aB n - -
ca9dfc88
IZ
459(?i:a)b ab y $& ab
460((?i:a))b ab y $&:$1 ab:a
461(?i:a)b Ab y $& Ab
462((?i:a))b Ab y $&:$1 Ab:A
463(?i:a)b aB n - -
464((?i:a))b aB n - -
465'(?:(?-i)a)b'i ab y $& ab
466'((?-i)a)b'i ab y $&:$1 ab:a
467'(?:(?-i)a)b'i aB y $& aB
468'((?-i)a)b'i aB y $&:$1 aB:a
469'(?:(?-i)a)b'i Ab n - -
470'((?-i)a)b'i Ab n - -
471'(?:(?-i)a)b'i aB y $& aB
472'((?-i)a)b'i aB y $1 a
473'(?:(?-i)a)b'i AB n - -
474'((?-i)a)b'i AB n - -
475'(?-i:a)b'i ab y $& ab
476'((?-i:a))b'i ab y $&:$1 ab:a
477'(?-i:a)b'i aB y $& aB
478'((?-i:a))b'i aB y $&:$1 aB:a
479'(?-i:a)b'i Ab n - -
480'((?-i:a))b'i Ab n - -
481'(?-i:a)b'i aB y $& aB
482'((?-i:a))b'i aB y $1 a
483'(?-i:a)b'i AB n - -
484'((?-i:a))b'i AB n - -
485'((?-i:a.))b'i a\nB n - -
486'((?s-i:a.))b'i a\nB y $1 a\n
487'((?s-i:a.))b'i B\nB n - -
c277df42
IZ
488(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b))) cabbbb y $& cabbbb
489(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb))) caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb y $& caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
490'(ab)\d\1'i Ab4ab y $1 Ab
491'(ab)\d\1'i ab4Ab y $1 ab
ad4f75a6 492foo\w*\d{4}baz foobar1234baz y $& foobar1234baz
c277df42 493a(?{})b cabd y $& ab
24b61696
RK
494a(?{)b - c - Sequence (?{...}) not terminated or not {}-balanced
495a(?{{})b - c - Sequence (?{...}) not terminated or not {}-balanced
380a0633 496a(?{}})b - c -
24b61696 497a(?{"{"})b - c - Sequence (?{...}) not terminated or not {}-balanced
c277df42 498a(?{"\{"})b cabd y $& ab
d98d5fff 499a(?{"{"}})b - c - Unmatched right curly bracket
c277df42
IZ
500a(?{$bl="\{"}).b caxbd y $bl {
501x(~~)*(?:(?:F)?)? x~~ y - -
502^a(?#xxx){3}c aaac y $& aaac
503'^a (?#xxx) (?#yyy) {3}c'x aaac y $& aaac
504(?<![cd])b dbcb n - -
505(?<![cd])[ab] dbaacb y $& a
506(?<!(c|d))b dbcb n - -
507(?<!(c|d))[ab] dbaacb y $& a
508(?<!cd)[ab] cdaccb y $& b
509^(?:a?b?)*$ a-- n - -
510((?s)^a(.))((?m)^b$) a\nb\nc\n y $1;$2;$3 a\n;\n;b
511((?m)^b$) a\nb\nc\n y $1 b
512(?m)^b a\nb\n y $& b
513(?m)^(b) a\nb\n y $1 b
514((?m)^b) a\nb\n y $1 b
515\n((?m)^b) a\nb\n y $1 b
516((?s).)c(?!.) a\nb\nc\n y $1 \n
517((?s).)c(?!.) a\nb\nc\n y $1:$& \n:\nc
518((?s)b.)c(?!.) a\nb\nc\n y $1 b\n
519((?s)b.)c(?!.) a\nb\nc\n y $1:$& b\n:b\nc
520^b a\nb\nc\n n - -
521()^b a\nb\nc\n n - -
522((?m)^b) a\nb\nc\n y $1 b
523(?(1)a|b) a n - -
524(?(1)b|a) a y $& a
525(x)?(?(1)a|b) a n - -
526(x)?(?(1)b|a) a y $& a
527()?(?(1)b|a) a y $& a
528()(?(1)b|a) a n - -
529()?(?(1)a|b) a y $& a
530^(\()?blah(?(1)(\)))$ (blah) y $2 )
531^(\()?blah(?(1)(\)))$ blah y ($2) ()
532^(\()?blah(?(1)(\)))$ blah) n - -
533^(\()?blah(?(1)(\)))$ (blah n - -
534^(\(+)?blah(?(1)(\)))$ (blah) y $2 )
535^(\(+)?blah(?(1)(\)))$ blah y ($2) ()
536^(\(+)?blah(?(1)(\)))$ blah) n - -
537^(\(+)?blah(?(1)(\)))$ (blah n - -
24b61696
RK
538(?(1?)a|b) a c - Switch condition not recognized
539(?(1)a|b|c) a c - Switch (?(condition)... contains too many branches
c277df42
IZ
540(?(?{0})a|b) a n - -
541(?(?{0})b|a) a y $& a
542(?(?{1})b|a) a n - -
543(?(?{1})a|b) a y $& a
544(?(?!a)a|b) a n - -
545(?(?!a)b|a) a y $& a
546(?(?=a)b|a) a n - -
547(?(?=a)a|b) a y $& a
548(?=(a+?))(\1ab) aaab y $2 aab
549^(?=(a+?))\1ab aaab n - -
550(\w+:)+ one: y $1 one:
551$(?<=^(a)) a y $1 a
552(?=(a+?))(\1ab) aaab y $2 aab
553^(?=(a+?))\1ab aaab n - -
554([\w:]+::)?(\w+)$ abcd: n - -
555([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
556([\w:]+::)?(\w+)$ xy:z:::abcd y $1-$2 xy:z:::-abcd
557^[^bcd]*(c+) aexycd y $1 c
558(a*)b+ caab y $1 aa
559([\w:]+::)?(\w+)$ abcd: n - -
560([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
561([\w:]+::)?(\w+)$ xy:z:::abcd y $1-$2 xy:z:::-abcd
562^[^bcd]*(c+) aexycd y $1 c
563(?{$a=2})a*aa(?{local$a=$a+1})k*c(?{$b=$a}) yaaxxaaaacd y $b 3
564(?{$a=2})(a(?{local$a=$a+1}))*aak*c(?{$b=$a}) yaaxxaaaacd y $b 4
565(>a+)ab aaab n - -
fe44a5e8 566(?>a+)b aaab y - -
4599a1de
JH
567([[:]+) a:[b]: y $1 :[
568([[=]+) a=[b]= y $1 =[
569([[.]+) a.[b]. y $1 .[
24b61696
RK
570[a[:xyz: - c - Unmatched [
571[a[:xyz:] - c - POSIX class [:xyz:] unknown
767d463e 572[a[:]b[:c] abc y $& abc
24b61696 573([a[:xyz:]b]+) pbaq c - POSIX class [:xyz:] unknown
b8c5462f
JH
574[a[:]b[:c] abc y $& abc
575([[:alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
576([[:alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy
577([[:ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__-- ${nulnul}
578([[:cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${nulnul}
579([[:digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
580([[:graph:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
581([[:lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd
582([[:print:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
583([[:punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 __--
584([[:space:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1
585([[:word:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__
586([[:upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
587([[:xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01
588([[:^alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
589([[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 __-- ${nulnul}${ffff}
590([[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff}
591([[:^cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
592([[:^digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
593([[:^lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
594([[:^print:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${nulnul}${ffff}
595([[:^punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy
596([[:^space:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__--
597([[:^word:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 -- ${nulnul}${ffff}
598([[:^upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd01
599([[:^xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 Xy__-- ${nulnul}${ffff}
24b61696
RK
600[[:foo:]] - c - POSIX class [:foo:] unknown
601[[:^foo:]] - c - POSIX class [:^foo:] unknown
fe44a5e8
IZ
602((?>a+)b) aaab y $1 aaab
603(?>(a+))b aaab y $1 aaa
c277df42 604((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x
24b61696 605(?<=x+)y - c - Variable length lookbehind not implemented
9baa0206 606a{37,17} - c - Can't do {n,m} with n > m
cf93c79d
IZ
607\Z a\nb\n y $-[0] 3
608\z a\nb\n y $-[0] 4
609$ a\nb\n y $-[0] 3
610\Z b\na\n y $-[0] 3
611\z b\na\n y $-[0] 4
612$ b\na\n y $-[0] 3
613\Z b\na y $-[0] 3
614\z b\na y $-[0] 3
615$ b\na y $-[0] 3
616'\Z'm a\nb\n y $-[0] 3
617'\z'm a\nb\n y $-[0] 4
618'$'m a\nb\n y $-[0] 1
619'\Z'm b\na\n y $-[0] 3
620'\z'm b\na\n y $-[0] 4
621'$'m b\na\n y $-[0] 1
622'\Z'm b\na y $-[0] 3
623'\z'm b\na y $-[0] 3
624'$'m b\na y $-[0] 1
b85d18e9 625a\Z a\nb\n n - -
cf93c79d
IZ
626a\z a\nb\n n - -
627a$ a\nb\n n - -
628a\Z b\na\n y $-[0] 2
629a\z b\na\n n - -
630a$ b\na\n y $-[0] 2
631a\Z b\na y $-[0] 2
632a\z b\na y $-[0] 2
633a$ b\na y $-[0] 2
a1917ab9 634'a\Z'm a\nb\n n - -
cf93c79d
IZ
635'a\z'm a\nb\n n - -
636'a$'m a\nb\n y $-[0] 0
637'a\Z'm b\na\n y $-[0] 2
638'a\z'm b\na\n n - -
639'a$'m b\na\n y $-[0] 2
640'a\Z'm b\na y $-[0] 2
641'a\z'm b\na y $-[0] 2
642'a$'m b\na y $-[0] 2
643aa\Z aa\nb\n n - -
644aa\z aa\nb\n n - -
645aa$ aa\nb\n n - -
646aa\Z b\naa\n y $-[0] 2
647aa\z b\naa\n n - -
648aa$ b\naa\n y $-[0] 2
649aa\Z b\naa y $-[0] 2
650aa\z b\naa y $-[0] 2
651aa$ b\naa y $-[0] 2
a1917ab9 652'aa\Z'm aa\nb\n n - -
cf93c79d
IZ
653'aa\z'm aa\nb\n n - -
654'aa$'m aa\nb\n y $-[0] 0
655'aa\Z'm b\naa\n y $-[0] 2
656'aa\z'm b\naa\n n - -
657'aa$'m b\naa\n y $-[0] 2
658'aa\Z'm b\naa y $-[0] 2
659'aa\z'm b\naa y $-[0] 2
660'aa$'m b\naa y $-[0] 2
661aa\Z ac\nb\n n - -
662aa\z ac\nb\n n - -
663aa$ ac\nb\n n - -
664aa\Z b\nac\n n - -
665aa\z b\nac\n n - -
666aa$ b\nac\n n - -
667aa\Z b\nac n - -
668aa\z b\nac n - -
669aa$ b\nac n - -
670'aa\Z'm ac\nb\n n - -
671'aa\z'm ac\nb\n n - -
672'aa$'m ac\nb\n n - -
673'aa\Z'm b\nac\n n - -
674'aa\z'm b\nac\n n - -
675'aa$'m b\nac\n n - -
676'aa\Z'm b\nac n - -
677'aa\z'm b\nac n - -
678'aa$'m b\nac n - -
679aa\Z ca\nb\n n - -
680aa\z ca\nb\n n - -
681aa$ ca\nb\n n - -
682aa\Z b\nca\n n - -
683aa\z b\nca\n n - -
684aa$ b\nca\n n - -
685aa\Z b\nca n - -
686aa\z b\nca n - -
687aa$ b\nca n - -
688'aa\Z'm ca\nb\n n - -
689'aa\z'm ca\nb\n n - -
690'aa$'m ca\nb\n n - -
691'aa\Z'm b\nca\n n - -
692'aa\z'm b\nca\n n - -
693'aa$'m b\nca\n n - -
694'aa\Z'm b\nca n - -
695'aa\z'm b\nca n - -
696'aa$'m b\nca n - -
697ab\Z ab\nb\n n - -
698ab\z ab\nb\n n - -
699ab$ ab\nb\n n - -
700ab\Z b\nab\n y $-[0] 2
701ab\z b\nab\n n - -
702ab$ b\nab\n y $-[0] 2
703ab\Z b\nab y $-[0] 2
704ab\z b\nab y $-[0] 2
705ab$ b\nab y $-[0] 2
a1917ab9 706'ab\Z'm ab\nb\n n - -
cf93c79d
IZ
707'ab\z'm ab\nb\n n - -
708'ab$'m ab\nb\n y $-[0] 0
709'ab\Z'm b\nab\n y $-[0] 2
710'ab\z'm b\nab\n n - -
711'ab$'m b\nab\n y $-[0] 2
712'ab\Z'm b\nab y $-[0] 2
713'ab\z'm b\nab y $-[0] 2
714'ab$'m b\nab y $-[0] 2
715ab\Z ac\nb\n n - -
716ab\z ac\nb\n n - -
717ab$ ac\nb\n n - -
718ab\Z b\nac\n n - -
719ab\z b\nac\n n - -
720ab$ b\nac\n n - -
721ab\Z b\nac n - -
722ab\z b\nac n - -
723ab$ b\nac n - -
724'ab\Z'm ac\nb\n n - -
725'ab\z'm ac\nb\n n - -
726'ab$'m ac\nb\n n - -
727'ab\Z'm b\nac\n n - -
728'ab\z'm b\nac\n n - -
729'ab$'m b\nac\n n - -
730'ab\Z'm b\nac n - -
731'ab\z'm b\nac n - -
732'ab$'m b\nac n - -
733ab\Z ca\nb\n n - -
734ab\z ca\nb\n n - -
735ab$ ca\nb\n n - -
736ab\Z b\nca\n n - -
737ab\z b\nca\n n - -
738ab$ b\nca\n n - -
739ab\Z b\nca n - -
740ab\z b\nca n - -
741ab$ b\nca n - -
742'ab\Z'm ca\nb\n n - -
743'ab\z'm ca\nb\n n - -
744'ab$'m ca\nb\n n - -
745'ab\Z'm b\nca\n n - -
746'ab\z'm b\nca\n n - -
747'ab$'m b\nca\n n - -
748'ab\Z'm b\nca n - -
749'ab\z'm b\nca n - -
750'ab$'m b\nca n - -
751abb\Z abb\nb\n n - -
752abb\z abb\nb\n n - -
753abb$ abb\nb\n n - -
754abb\Z b\nabb\n y $-[0] 2
755abb\z b\nabb\n n - -
756abb$ b\nabb\n y $-[0] 2
757abb\Z b\nabb y $-[0] 2
758abb\z b\nabb y $-[0] 2
759abb$ b\nabb y $-[0] 2
a1917ab9 760'abb\Z'm abb\nb\n n - -
cf93c79d
IZ
761'abb\z'm abb\nb\n n - -
762'abb$'m abb\nb\n y $-[0] 0
763'abb\Z'm b\nabb\n y $-[0] 2
764'abb\z'm b\nabb\n n - -
765'abb$'m b\nabb\n y $-[0] 2
766'abb\Z'm b\nabb y $-[0] 2
767'abb\z'm b\nabb y $-[0] 2
768'abb$'m b\nabb y $-[0] 2
769abb\Z ac\nb\n n - -
770abb\z ac\nb\n n - -
771abb$ ac\nb\n n - -
772abb\Z b\nac\n n - -
773abb\z b\nac\n n - -
774abb$ b\nac\n n - -
775abb\Z b\nac n - -
776abb\z b\nac n - -
777abb$ b\nac n - -
778'abb\Z'm ac\nb\n n - -
779'abb\z'm ac\nb\n n - -
780'abb$'m ac\nb\n n - -
781'abb\Z'm b\nac\n n - -
782'abb\z'm b\nac\n n - -
783'abb$'m b\nac\n n - -
784'abb\Z'm b\nac n - -
785'abb\z'm b\nac n - -
786'abb$'m b\nac n - -
787abb\Z ca\nb\n n - -
788abb\z ca\nb\n n - -
789abb$ ca\nb\n n - -
790abb\Z b\nca\n n - -
791abb\z b\nca\n n - -
792abb$ b\nca\n n - -
793abb\Z b\nca n - -
794abb\z b\nca n - -
795abb$ b\nca n - -
796'abb\Z'm ca\nb\n n - -
797'abb\z'm ca\nb\n n - -
798'abb$'m ca\nb\n n - -
799'abb\Z'm b\nca\n n - -
800'abb\z'm b\nca\n n - -
801'abb$'m b\nca\n n - -
802'abb\Z'm b\nca n - -
803'abb\z'm b\nca n - -
804'abb$'m b\nca n - -
8e680dc3 805(^|x)(c) ca y $2 c
aca2d497 806a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz x n - -
0f5d15d6 807a(?{$a=2;$b=3;($b)=$a})b yabz y $b 2
9fe1d20c 808round\(((?>[^()]+))\) _I(round(xs * sz),1) y $1 xs * sz
ce3e6498
HS
809'((?x:.) )' x y $1- x -
810'((?-x:.) )'x x y $1- x-
adac82c7 811foo.bart foo.bart y - -
2c2d71f5
JH
812'^d[x][x][x]'m abcd\ndxxx y - -
813.X(.+)+X bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
814.X(.+)+XX bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
815.XX(.+)+X bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
816.X(.+)+X bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
817.X(.+)+XX bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
818.XX(.+)+X bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
819.X(.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
820.X(.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
821.XX(.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
822.X(.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
823.X(.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
824.XX(.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
825.[X](.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
826.[X](.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
827.[X][X](.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y - -
828.[X](.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
829.[X](.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
830.[X][X](.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa n - -
831tt+$ xxxtt y - -
1209ba90 832([a-\d]+) za-9z y $1 a-9
1209ba90 833([\d-z]+) a0-za y $1 0-z
73b437c8 834([\d-\s]+) a0- z y $1 0-
1209ba90 835([a-[:digit:]]+) za-9z y $1 a-9
1209ba90 836([[:digit:]-z]+) =0-z= y $1 0-z
73b437c8 837([[:digit:]-[:alpha:]]+) =0-z= y $1 0-z
30382c73 838\GX.*X aaaXbX n - -
6eb5f6b9
JH
839(\d+\.\d+) 3.1415926 y $1 3.1415926
840(\ba.{0,10}br) have a web browser y $1 a web br
66e933ab
GS
841'\.c(pp|xx|c)?$'i Changes n - -
842'\.c(pp|xx|c)?$'i IO.c y - -
843'(\.c(pp|xx|c)?$)'i IO.c y $1 .c
653099ff 844^([a-z]:) C:/ n - -
60e71179 845'^\S\s+aa$'m \nx aa y - -
de0c8cb8 846(^|a)b ab y - -
f06a1d4e 847^([ab]*?)(b)?(c)$ abac y -$2- --
29d1e993 848(\w)?(abc)\1b abcab n - -
2a8d9689
HS
849^(?:.,){2}c a,b,c y - -
850^(.,){2}c a,b,c y $1 b,
851^(?:[^,]*,){2}c a,b,c y - -
852^([^,]*,){2}c a,b,c y $1 b,
4b2cff9a
HS
853^([^,]*,){3}d aaa,b,c,d y $1 c,
854^([^,]*,){3,}d aaa,b,c,d y $1 c,
855^([^,]*,){0,3}d aaa,b,c,d y $1 c,
856^([^,]{1,3},){3}d aaa,b,c,d y $1 c,
857^([^,]{1,3},){3,}d aaa,b,c,d y $1 c,
858^([^,]{1,3},){0,3}d aaa,b,c,d y $1 c,
859^([^,]{1,},){3}d aaa,b,c,d y $1 c,
860^([^,]{1,},){3,}d aaa,b,c,d y $1 c,
861^([^,]{1,},){0,3}d aaa,b,c,d y $1 c,
862^([^,]{0,3},){3}d aaa,b,c,d y $1 c,
863^([^,]{0,3},){3,}d aaa,b,c,d y $1 c,
864^([^,]{0,3},){0,3}d aaa,b,c,d y $1 c,
bf93d4cc 865(?i) y - -
c2a73568 866'(?!\A)x'm a\nxb\n y - -
c1d44abf
JH
867^(a(b)?)+$ aba y -$1-$2- -a--
868^(aa(bb)?)+$ aabbaa y -$1-$2- -aa--
0e41cd87 869'^.{9}abc.*\n'm 123\nabcabcabcabc\n y - -
66417f84
HS
870^(a)?a$ a y -$1- --
871^(a)?(?(1)a|b)+$ a n - -
cb434fcc
IZ
872^(a\1?)(a\1?)(a\2?)(a\3?)$ aaaaaa y $1,$2,$3,$4 a,aa,a,aa
873^(a\1?){4}$ aaaaaa y $1 aa
874^(0+)?(?:x(1))? x1 y - -
875^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))? 012cxx0190 y - -
e1901655
IZ
876^(b+?|a){1,2}c bbbac y $1 a
877^(b+?|a){1,2}c bbbbac y $1 a
2e36c929 878\((\w\. \w+)\) cd. (A. Tw) y -$1- -A. Tw-
f49d4d0f
HS
879((?:aaaa|bbbb)cccc)? aaaacccc y - -
880((?:aaaa|bbbb)cccc)? bbbbcccc y - -
36670241
JH
881(a)?(a)+ a y $1:$2 :a -
882(ab)?(ab)+ ab y $1:$2 :ab -
883(abc)?(abc)+ abc y $1:$2 :abc -
12d33761 884'b\s^'m a\nb\n n - -
ee0b7718 885\ba a y - -
8e514ae6 886^(a(??{"(?!)"})|(a)(?{1}))b ab y $2 a # [ID 20010811.006]
055bb491
HS
887ab(?i)cd AbCd n - - # [ID 20010809.023]
888ab(?i)cd abCd y - -
f31a99c8
HS
889(A|B)*(?(1)(CD)|(CD)) CD y $2-$3 -CD
890(A|B)*(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
891(A|B)*?(?(1)(CD)|(CD)) CD y $2-$3 -CD # [ID 20010803.016]
892(A|B)*?(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
f65d3ee7 893'^(o)(?!.*\1)'i Oo n - -
24ba5a3c 894(.*)\d+\1 abc12bc y $1 bc
1ac24cf0 895(?m:(foo\s*$)) foo\n bar y $1 foo
a84d97b6
HS
896(.*)c abcd y $1 ab
897(.*)(?=c) abcd y $1 ab
898(.*)(?=c)c abcd yB $1 ab
899(.*)(?=b|c) abcd y $1 ab
900(.*)(?=b|c)c abcd y $1 ab
901(.*)(?=c|b) abcd y $1 ab
902(.*)(?=c|b)c abcd y $1 ab
903(.*)(?=[bc]) abcd y $1 ab
904(.*)(?=[bc])c abcd yB $1 ab
905(.*)(?<=b) abcd y $1 ab
906(.*)(?<=b)c abcd y $1 ab
907(.*)(?<=b|c) abcd y $1 abc
908(.*)(?<=b|c)c abcd y $1 ab
909(.*)(?<=c|b) abcd y $1 abc
910(.*)(?<=c|b)c abcd y $1 ab
911(.*)(?<=[bc]) abcd y $1 abc
912(.*)(?<=[bc])c abcd y $1 ab
913(.*?)c abcd y $1 ab
914(.*?)(?=c) abcd y $1 ab
915(.*?)(?=c)c abcd yB $1 ab
916(.*?)(?=b|c) abcd y $1 a
917(.*?)(?=b|c)c abcd y $1 ab
918(.*?)(?=c|b) abcd y $1 a
919(.*?)(?=c|b)c abcd y $1 ab
920(.*?)(?=[bc]) abcd y $1 a
921(.*?)(?=[bc])c abcd yB $1 ab
922(.*?)(?<=b) abcd y $1 ab
923(.*?)(?<=b)c abcd y $1 ab
924(.*?)(?<=b|c) abcd y $1 ab
925(.*?)(?<=b|c)c abcd y $1 ab
926(.*?)(?<=c|b) abcd y $1 ab
927(.*?)(?<=c|b)c abcd y $1 ab
928(.*?)(?<=[bc]) abcd y $1 ab
929(.*?)(?<=[bc])c abcd y $1 ab
d3aea5f7 9302(]*)?$\1 2 y $& 2
075aa684 931(??{}) x y - -
ecc99935 932a(b)?? abc y <$1> <> # undef [perl #16773]
c152dc43 933(\d{1,3}\.){3,} 128.134.142.8 y <$1> <142.> # [perl #18019]
b0e70d55
HS
934^.{3,4}(.+)\1\z foobarbar y $1 bar # 16 tests for [perl #23171]
935^(?:f|o|b){3,4}(.+)\1\z foobarbar y $1 bar
936^.{3,4}((?:b|a|r)+)\1\z foobarbar y $1 bar
937^(?:f|o|b){3,4}((?:b|a|r)+)\1\z foobarbar y $1 bar
938^.{3,4}(.+?)\1\z foobarbar y $1 bar
939^(?:f|o|b){3,4}(.+?)\1\z foobarbar y $1 bar
940^.{3,4}((?:b|a|r)+?)\1\z foobarbar y $1 bar
941^(?:f|o|b){3,4}((?:b|a|r)+?)\1\z foobarbar y $1 bar
942^.{2,3}?(.+)\1\z foobarbar y $1 bar
943^(?:f|o|b){2,3}?(.+)\1\z foobarbar y $1 bar
944^.{2,3}?((?:b|a|r)+)\1\z foobarbar y $1 bar
945^(?:f|o|b){2,3}?((?:b|a|r)+)\1\z foobarbar y $1 bar
946^.{2,3}?(.+?)\1\z foobarbar y $1 bar
947^(?:f|o|b){2,3}?(.+?)\1\z foobarbar y $1 bar
948^.{2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar
949^(?:f|o|b){2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar
c2b0868c 950.*a(?!(b|cd)*e).*f ......abef n - - # [perl #23030]
e994fd66
AE
951x(?# x c - Sequence (?#... not terminated
952:x(?#: x c - Sequence (?#... not terminated
a3621e74
YO
953(WORDS|WORD)S WORDS y $1 WORD
954(X.|WORDS|X.|WORD)S WORDS y $1 WORD
955(WORDS|WORLD|WORD)S WORDS y $1 WORD
956(X.|WORDS|WORD|Y.)S WORDS y $1 WORD
957(foo|fool|x.|money|parted)$ fool y $1 fool
958(x.|foo|fool|x.|money|parted|y.)$ fool y $1 fool
959(foo|fool|money|parted)$ fool y $1 fool
960(foo|fool|x.|money|parted)$ fools n - -
961(x.|foo|fool|x.|money|parted|y.)$ fools n - -
962(foo|fool|money|parted)$ fools n - -
3dab1dad
YO
963(a|aa|aaa||aaaa|aaaaa|aaaaaa)(b|c) aaaaaaaaaaaaaaab y $1$2 aaaaaab
964(a|aa|aaa||aaaa|aaaaa|aaaaaa)(??{$1&&""})(b|c) aaaaaaaaaaaaaaab y $1$2 aaaaaab
a3621e74 965(a|aa|aaa|aaaa|aaaaa|aaaaaa)(??{$1&&"foo"})(b|c) aaaaaaaaaaaaaaab n - -
3ab3c9b4
HS
966^(a*?)(?!(aa|aaaa)*$) aaaaaaaaaaaaaaaaaaaa y $1 a # [perl #34195]
967^(a*?)(?!(aa|aaaa)*$)(?=a\z) aaaaaaaa y $1 aaaaaaa
c315bfe8 968^(.)\s+.$(?(1)) A B y $1 A # [perl #37688]
3a2830be
A
969(?:r?)*?r|(.{2,4}) abcde y $1 abcd
970(?!)+?|(.{2,4}) abcde y $1 abcd
7409bbd3 971^(a*?)(?!(a{6}|a{5})*$) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa y $+[1] 12 # super-linear cache bug may return 18
dad79028
DM
972^((?>(?:aa)?b)?) aab y $1 aab
973^((?:aa)*)(?:X+((?:\d+|-)(?:X+(.+))?))?$ aaaaX5 y $1 aaaa
3dab1dad
YO
974X(A|B||C|D)Y XXXYYY y $& XY # Trie w/ NOTHING
975(?i:X([A]|[B]|y[Y]y|[D]|)Y) XXXYYYB y $& XY # Trie w/ NOTHING
40a82448 976^([a]{1})*$ aa y $1 a
3298f257
DM
977a(?!b(?!c))(..) abababc y $1 bc # test nested negatives
978a(?!b(?=a))(..) abababc y $1 bc # test nested lookaheads
979a(?!b(?!c(?!d(?!e))))...(.) abxabcdxabcde y $1 e
980X(?!b+(?!(c+)*(?!(c+)*d))).*X aXbbbbbbbcccccccccccccaaaX y - -
786e8c11
YO
981^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
982^(XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
983^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
984^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
985^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
986^([TUV]+|XXXXXXXXXX|YYYYYYYYYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQX: y $1 ZEQQQX
987^(XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
988^(XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
989^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
990^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P): ZEQQQX: y $1 ZEQQQX
991^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQQQQQQQQQQQQQQQQP: y $1 ZEQQQQQQQQQQQQQQQQQQP
992^([TUV]+|XXX|YYY|Z.Q*X|Z[TE]Q*P|[MKJ]): ZEQQQX: y $1 ZEQQQX
993X(?:ABCF[cC]x*|ABCD|ABCF):(?:DIT|DID|DIM) XABCFCxxxxxxxxxx:DIM y $& XABCFCxxxxxxxxxx:DIM
994(((ABCD|ABCE|ABCF)))(A|B|C[xy]*): ABCFCxxxxxxxxxx:DIM y $& ABCFCxxxxxxxxxx:
1de06328
YO
995(?=foo) foo y pos 0
996(?=foo) XfooY y pos 1
997.*(?=foo) XfooY y pos 1
998(?<=foo) foo y pos 3
999(?<=foo) XfooY y pos 4
1000.*(?<=foo) foo y pos 3
1001.*(?<=foo) XfooY y pos 4
1002(?<=foo)Y XfooY y pos 5
1003o(?<=foo)Y ..XfooY.. y pos 7
1004X(?=foo)f ..XfooY.. y pos 4
1005X(?=foo) ..XfooY.. y pos 3
1006X(?<=foo.)[YZ] ..XfooXY.. y pos 8
1007(?=XY*foo) Xfoo y pos 0
1008^(?=XY*foo) Xfoo y pos 0
faec1544
DM
1009^(??{"a+"})a aa y $& aa
1010^(?:(??{"a+"})|b)a aa y $& aa
1011^(??{chr 0x100}).$ \x{100}\x{100} y $& \x{100}\x{100}
1012^(??{q(\x{100})}). \x{100}\x{100} y $& \x{100}\x{100}
1013^(??{q(.+)})\x{100} \x{100}\x{100} y $& \x{100}\x{100}
1014^(??{q(.)})\x{100} \x{100}\x{100} y $& \x{100}\x{100}
1015^(??{chr 0x100})\xbb \x{100}\x{bb} y $& \x{100}\x{bb}
1016^(.)(??{"(.)(.)"})(.)$ abcd y $1-$2 a-d
1017^(.)(??{"(bz+|.)(.)"})(.)$ abcd y $1-$2 a-d
1018^(.)((??{"(.)(cz+)"})|.) abcd y $1-$2 a-b
1019^a(?>(??{q(b)}))(??{q(c)})d abcd y - -
1020^x(??{""})+$ x y $& x
6bda09f9
YO
1021^(<(?:[^<>]+|(?3)|(?1))*>)()(!>!>!>)$ <<!>!>!>><>>!>!>!> y $1 <<!>!>!>><>>
1022^(<(?:[^<>]+|(?1))*>)$ <<><<<><>>>> y $1 <<><<<><>>>>
1023((?2)*)([fF]o+) fooFoFoo y $1-$2 fooFo-Foo
1024(<(?:[^<>]+|(?R))*>) <<><<<><>>>> y $1 <<><<<><>>>>
81714fb9
YO
1025(?<n>foo|bar|baz) snofooewa y $1 foo
1026(?<n>foo|bar|baz) snofooewa y $+{n} foo
1027(?<n>foo|bar|baz)(?<m>[ew]+) snofooewa y $+{n} foo
1028(?<n>foo|bar|baz)(?<m>[ew]+) snofooewa y $+{m} ew
1029(?<n>foo)|(?<n>bar)|(?<n>baz) snofooewa y $+{n} foo
1030(?<n>foo)(??{ $+{n} }) snofooefoofoowaa y $+{n} foo
1031/(?'n'foo|bar|baz)/ snofooewa y $1 foo
1032/(?'n'foo|bar|baz)/ snofooewa y $+{n} foo
1033/(?'n'foo|bar|baz)(?'m'[ew]+)/ snofooewa y $+{n} foo
1034/(?'n'foo|bar|baz)(?'m'[ew]+)/ snofooewa y $+{m} ew
1035/(?'n'foo)|(?'n'bar)|(?<n>baz)/ snobazewa y $+{n} baz
1036/(?'n'foo)(??{ $+{n} })/ snofooefoofoowaa y $+{n} foo
1037/(?'n'foo)\k<n>/ ..foofoo.. y $1 foo
1038/(?'n'foo)\k<n>/ ..foofoo.. y $+{n} foo
1039/(?<n>foo)\k'n'/ ..foofoo.. y $1 foo
1040/(?<n>foo)\k'n'/ ..foofoo.. y $+{n} foo
1041/(?:(?<n>foo)|(?<n>bar))\k<n>/ ..barbar.. y $+{n} bar
894be9b7
YO
1042/^(?'main'<(?:[^<>]+|(?&crap)|(?&main))*>)(?'empty')(?'crap'!>!>!>)$/ <<!>!>!>><>>!>!>!> y $+{main} <<!>!>!>><>>
1043/^(?'main'<(?:[^<>]+|(?&main))*>)$/ <<><<<><>>>> y $1 <<><<<><>>>>
1044/(?'first'(?&second)*)(?'second'[fF]o+)/ fooFoFoo y $+{first}-$+{second} fooFo-Foo
0a4db386
YO
1045(?<A>foo)?(?(<A>)bar|nada) foobar y $+{A} foo
1046(?<A>foo)?(?(<A>)bar|nada) foo-barnada y $& nada
1047(?<A>foo)?(?(1)bar|nada) foo-barnada y $& nada
1048(?<A>foo(?(R)bar))?(?1) foofoobar y $1 foo
1049(?<A>foo(?(R)bar))?(?1) foofoobar y $& foofoobar
1050(x)(?<A>foo(?(R&A)bar))?(?&A) xfoofoobar y $2 foo
1051(x)(?<A>foo(?(R&A)bar))?(?&A) xfoofoobar y $& xfoofoobar
1052(x)(?<A>foo(?(R2)bar))?(?&A) xfoofoobar y $2 foo
1053(x)(?<A>foo(?(R2)bar))?(?&A) xfoofoobar y $& xfoofoobar
1054(?1)(?(DEFINE)(blah)) blah y $& blah
1055/^(?<PAL>(?<CHAR>.)((?&PAL)|.?)\k<CHAR>)$/ madamimadam y $& madamimadam
1056/^(?<PAL>(?<CHAR>.)((?&PAL)|.?)\k<CHAR>)$/ madamiamadam n - -
1057/(a)?((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
1058/(a)*((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
1059/(a)+((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
1060/(a){1,100}((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
1061/(a){0,100}((?1))(fox)/ aafox y $1-$2-$3 a-a-fox
1062/(ab)?((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
1063/(ab)*((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
1064/(ab)+((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
1065/(ab){1,100}((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
1066/(ab){0,100}((?1))(fox)/ ababfox y $1-$2-$3 ab-ab-fox
b9b4dddf
YO
1067# possessive captures
1068a++a aaaaa n - -
1069a*+a aaaaa n - -
1070a{1,5}+a aaaaa n - -
1071a?+a ab n - -
1072a++b aaaaab y $& aaaaab
1073a*+b aaaaab y $& aaaaab
1074a{1,5}+b aaaaab y $& aaaaab
1075a?+b ab y $& ab
1076fooa++a fooaaaaa n - -
1077fooa*+a fooaaaaa n - -
1078fooa{1,5}+a fooaaaaa n - -
1079fooa?+a fooab n - -
1080fooa++b fooaaaaab y $& fooaaaaab
1081fooa*+b fooaaaaab y $& fooaaaaab
1082fooa{1,5}+b fooaaaaab y $& fooaaaaab
1083fooa?+b fooab y $& fooab
1084(?:aA)++(?:aA) aAaAaAaAaA n - aAaAaAaAaA
1085(aA)++(aA) aAaAaAaAaA n - aAaAaAaAaA
1086(aA|bB)++(aA|bB) aAaAbBaAbB n - aAaAbBaAbB
1087(?:aA|bB)++(?:aA|bB) aAbBbBbBaA n - aAbBbBbBaA
1088(?:aA)*+(?:aA) aAaAaAaAaA n - aAaAaAaAaA
1089(aA)*+(aA) aAaAaAaAaA n - aAaAaAaAaA
1090(aA|bB)*+(aA|bB) aAaAbBaAaA n - aAaAbBaAaA
1091(?:aA|bB)*+(?:aA|bB) aAaAaAbBaA n - aAaAaAbBaA
1092(?:aA){1,5}+(?:aA) aAaAaAaAaA n - aAaAaAaAaA
1093(aA){1,5}+(aA) aAaAaAaAaA n - aAaAaAaAaA
1094(aA|bB){1,5}+(aA|bB) aAaAbBaAaA n - aAaAbBaAaA
1095(?:aA|bB){1,5}+(?:aA|bB) bBbBbBbBbB n - bBbBbBbBbB
1096(?:aA)?+(?:aA) aAb n - aAb
1097(aA)?+(aA) aAb n - aAb
1098(aA|bB)?+(aA|bB) bBb n - bBb
1099(?:aA|bB)?+(?:aA|bB) aAb n - aAb
1100(?:aA)++b aAaAaAaAaAb y $& aAaAaAaAaAb
1101(aA)++b aAaAaAaAaAb y $& aAaAaAaAaAb
1102(aA|bB)++b aAbBaAaAbBb y $& aAbBaAaAbBb
1103(?:aA|bB)++b aAbBbBaAaAb y $& aAbBbBaAaAb
1104(?:aA)*+b aAaAaAaAaAb y $& aAaAaAaAaAb
1105(aA)*+b aAaAaAaAaAb y $& aAaAaAaAaAb
1106(aA|bB)*+b bBbBbBbBbBb y $& bBbBbBbBbBb
1107(?:aA|bB)*+b bBaAbBbBaAb y $& bBaAbBbBaAb
1108(?:aA){1,5}+b aAaAaAaAaAb y $& aAaAaAaAaAb
1109(aA){1,5}+b aAaAaAaAaAb y $& aAaAaAaAaAb
1110(aA|bB){1,5}+b bBaAbBaAbBb y $& bBaAbBaAbBb
1111(?:aA|bB){1,5}+b aAbBaAbBbBb y $& aAbBaAbBbBb
1112(?:aA)?+b aAb y $& aAb
1113(aA)?+b aAb y $& aAb
1114(aA|bB)?+b bBb y $& bBb
1115(?:aA|bB)?+b bBb y $& bBb
1116foo(?:aA)++(?:aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
1117foo(aA)++(aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
1118foo(aA|bB)++(aA|bB) foobBbBbBaAaA n - foobBbBbBaAaA
1119foo(?:aA|bB)++(?:aA|bB) fooaAaAaAaAaA n - fooaAaAaAaAaA
1120foo(?:aA)*+(?:aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
1121foo(aA)*+(aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
1122foo(aA|bB)*+(aA|bB) foobBaAbBaAaA n - foobBaAbBaAaA
1123foo(?:aA|bB)*+(?:aA|bB) fooaAaAbBbBaA n - fooaAaAbBbBaA
1124foo(?:aA){1,5}+(?:aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
1125foo(aA){1,5}+(aA) fooaAaAaAaAaA n - fooaAaAaAaAaA
1126foo(aA|bB){1,5}+(aA|bB) fooaAbBbBaAaA n - fooaAbBbBaAaA
1127foo(?:aA|bB){1,5}+(?:aA|bB) fooaAbBbBaAbB n - fooaAbBbBaAbB
1128foo(?:aA)?+(?:aA) fooaAb n - fooaAb
1129foo(aA)?+(aA) fooaAb n - fooaAb
1130foo(aA|bB)?+(aA|bB) foobBb n - foobBb
1131foo(?:aA|bB)?+(?:aA|bB) fooaAb n - fooaAb
1132foo(?:aA)++b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
1133foo(aA)++b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
1134foo(aA|bB)++b foobBaAbBaAbBb y $& foobBaAbBaAbBb
1135foo(?:aA|bB)++b fooaAaAbBaAaAb y $& fooaAaAbBaAaAb
1136foo(?:aA)*+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
1137foo(aA)*+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
1138foo(aA|bB)*+b foobBbBaAaAaAb y $& foobBbBaAaAaAb
1139foo(?:aA|bB)*+b foobBaAaAbBaAb y $& foobBaAaAbBaAb
1140foo(?:aA){1,5}+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
1141foo(aA){1,5}+b fooaAaAaAaAaAb y $& fooaAaAaAaAaAb
1142foo(aA|bB){1,5}+b foobBaAaAaAaAb y $& foobBaAaAaAaAb
1143foo(?:aA|bB){1,5}+b fooaAbBaAbBbBb y $& fooaAbBaAbBbBb
1144foo(?:aA)?+b fooaAb y $& fooaAb
1145foo(aA)?+b fooaAb y $& fooaAb
1146foo(aA|bB)?+b foobBb y $& foobBb
1147foo(?:aA|bB)?+b foobBb y $& foobBb
1148
1149([^()]++|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x
1150round\(([^()]++)\) _I(round(xs * sz),1) y $1 xs * sz
1151
7f69552c
YO
1152(foo[1x]|bar[2x]|baz[3x])+y foo1bar2baz3y y $1 baz3
1153(foo[1x]|bar[2x]|baz[3x])+y foo1bar2baz3y y $& foo1bar2baz3y
1154(foo[1x]|bar[2x]|baz[3x])*y foo1bar2baz3y y $1 baz3
1155(foo[1x]|bar[2x]|baz[3x])*y foo1bar2baz3y y $& foo1bar2baz3y
1156
1157([yX].|WORDS|[yX].|WORD)S WORDS y $1 WORD
1158(WORDS|WORLD|WORD)S WORDS y $1 WORD
1159([yX].|WORDS|WORD|[xY].)S WORDS y $1 WORD
1160(foo|fool|[zx].|money|parted)$ fool y $1 fool
1161([zx].|foo|fool|[zq].|money|parted|[yx].)$ fool y $1 fool
1162(foo|fool|[zx].|money|parted)$ fools n - -
1163([zx].|foo|fool|[qx].|money|parted|[py].)$ fools n - -
1164
1165([yX].|WORDS|[yX].|WORD)+S WORDS y $1 WORD
1166(WORDS|WORLD|WORD)+S WORDS y $1 WORD
1167([yX].|WORDS|WORD|[xY].)+S WORDS y $1 WORD
1168(foo|fool|[zx].|money|parted)+$ fool y $1 fool
1169([zx].|foo|fool|[zq].|money|parted|[yx].)+$ fool y $1 fool
1170(foo|fool|[zx].|money|parted)+$ fools n - -
1171([zx].|foo|fool|[qx].|money|parted|[py].)+$ fools n - -
1172
1173(x|y|z[QW])+(longish|loquatious|excessive|overblown[QW])+ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
1174(x|y|z[QW])*(longish|loquatious|excessive|overblown[QW])* xyzQzWlongishoverblownW y $1-$2 zW-overblownW
1175(x|y|z[QW]){1,5}(longish|loquatious|excessive|overblown[QW]){1,5} xyzQzWlongishoverblownW y $1-$2 zW-overblownW
1176
1177(x|y|z[QW])++(longish|loquatious|excessive|overblown[QW])++ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
1178(x|y|z[QW])*+(longish|loquatious|excessive|overblown[QW])*+ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
1179(x|y|z[QW]){1,5}+(longish|loquatious|excessive|overblown[QW]){1,5}+ xyzQzWlongishoverblownW y $1-$2 zW-overblownW
1180
1181
1182a*(?!) aaaab n - -
e2e6a0f1
YO
1183a*(*FAIL) aaaab n - -
1184a*(*F) aaaab n - -
1185
1186(A(A|B(*ACCEPT)|C)D)(E) AB y $1 AB
1187(A(A|B(*ACCEPT)|C)D)(E) ACDE y $1$2$3 ACDCE
1188
542fa716
YO
1189(a)(?:(?-1)|(?+1))(b) aab y $&-$1-$2 aab-a-b
1190(a)(?:(?-1)|(?+1))(b) abb y $&-$1-$2 abb-a-b
1191(a)(?:(?-1)|(?+1))(b) acb n - -