summaryrefslogtreecommitdiffstats
path: root/Lib/test/output/test_re
blob: c0a836659ffa9ce5fa2f6891b39f82076f5d5da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
test_re
('abc', 'abc', 0, 'found', 'abc')
('abc', 'xbc', 1)
('abc', 'axc', 1)
('abc', 'abx', 1)
('abc', 'xabcy', 0, 'found', 'abc')
('abc', 'ababc', 0, 'found', 'abc')
('ab*c', 'abc', 0, 'found', 'abc')
('ab*bc', 'abc', 0, 'found', 'abc')
('ab*bc', 'abbc', 0, 'found', 'abbc')
('ab*bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab+bc', 'abbc', 0, 'found', 'abbc')
('ab+bc', 'abc', 1)
('ab+bc', 'abq', 1)
('ab+bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab?bc', 'abbc', 0, 'found', 'abbc')
('ab?bc', 'abc', 0, 'found', 'abc')
('ab?bc', 'abbbbc', 1)
('ab?c', 'abc', 0, 'found', 'abc')
('^abc$', 'abc', 0, 'found', 'abc')
('^abc$', 'abcc', 1)
('^abc', 'abcc', 0, 'found', 'abc')
('^abc$', 'aabc', 1)
('abc$', 'aabc', 0, 'found', 'abc')
('^', 'abc', 0, 'found+"-"', '-')
('$', 'abc', 0, 'found+"-"', '-')
('a.c', 'abc', 0, 'found', 'abc')
('a.c', 'axc', 0, 'found', 'axc')
('a.*c', 'axyzc', 0, 'found', 'axyzc')
('a.*c', 'axyzd', 1)
('a[bc]d', 'abc', 1)
('a[bc]d', 'abd', 0, 'found', 'abd')
('a[b-d]e', 'abd', 1)
('a[b-d]e', 'ace', 0, 'found', 'ace')
('a[b-d]', 'aac', 0, 'found', 'ac')
('a[-b]', 'a-', 0, 'found', 'a-')
('a[\\-b]', 'a-', 0, 'found', 'a-')
('a[b-]', 'a-', 2)
('a[]b', '-', 2)
('a[', '-', 2)
('a\\', '-', 2)
('abc)', '-', 2)
('(abc', '-', 2)
('a]', 'a]', 0, 'found', 'a]')
('a[]]b', 'a]b', 0, 'found', 'a]b')
('a[\\]]b', 'a]b', 0, 'found', 'a]b')
('a[^bc]d', 'aed', 0, 'found', 'aed')
('a[^bc]d', 'abd', 1)
('a[^-b]c', 'adc', 0, 'found', 'adc')
('a[^-b]c', 'a-c', 1)
('a[^]b]c', 'a]c', 1)
('a[^]b]c', 'adc', 0, 'found', 'adc')
('\\ba\\b', 'a-', 0, '"-"', '-')
('\\ba\\b', '-a', 0, '"-"', '-')
('\\ba\\b', '-a-', 0, '"-"', '-')
('\\by\\b', 'xy', 1)
('\\by\\b', 'yz', 1)
('\\by\\b', 'xyz', 1)
('ab|cd', 'abc', 0, 'found', 'ab')
('ab|cd', 'abcd', 0, 'found', 'ab')
('()ef', 'def', 0, 'found+"-"+g1', 'ef-')
('$b', 'b', 1)
('a\\(b', 'a(b', 0, 'found+"-"+g1', 'a(b-Error')
('a\\(*b', 'ab', 0, 'found', 'ab')
('a\\(*b', 'a((b', 0, 'found', 'a((b')
('a\\\\b', 'a\\b', 0, 'found', 'a\\b')
('((a))', 'abc', 0, 'found+"-"+g1+"-"+g2', 'a-a-a')
('(a)b(c)', 'abc', 0, 'found+"-"+g1+"-"+g2', 'abc-a-c')
('a+b+c', 'aabbabc', 0, 'found', 'abc')
('(a+|b)*', 'ab', 0, 'found+"-"+g1', 'ab-b')
('(a+|b)+', 'ab', 0, 'found+"-"+g1', 'ab-b')
('(a+|b)?', 'ab', 0, 'found+"-"+g1', 'a-a')
(')(', '-', 2)
('[^ab]*', 'cde', 0, 'found', 'cde')
('abc', '', 1)
('a*', '', 0, 'found', '')
('a|b|c|d|e', 'e', 0, 'found', 'e')
('(a|b|c|d|e)f', 'ef', 0, 'found+"-"+g1', 'ef-e')
('abcd*efg', 'abcdefg', 0, 'found', 'abcdefg')
('ab*', 'xabyabbbz', 0, 'found', 'ab')
('ab*', 'xayabbbz', 0, 'found', 'a')
('(ab|cd)e', 'abcde', 0, 'found+"-"+g1', 'cde-cd')
('[abhgefdc]ij', 'hij', 0, 'found', 'hij')
('^(ab|cd)e', 'abcde', 1, 'xg1y', 'xy')
('(abc|)ef', 'abcdef', 0, 'found+"-"+g1', 'ef-')
('(a|b)c*d', 'abcd', 0, 'found+"-"+g1', 'bcd-b')
('(ab|ab*)bc', 'abc', 0, 'found+"-"+g1', 'abc-a')
('a([bc]*)c*', 'abc', 0, 'found+"-"+g1', 'abc-bc')
('a([bc]*)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d')
('a([bc]+)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d')
('a([bc]*)(c+d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-b-cd')
('a[bcd]*dcdcde', 'adcdcde', 0, 'found', 'adcdcde')
('a[bcd]+dcdcde', 'adcdcde', 1)
('(ab|a)b*c', 'abc', 0, 'found+"-"+g1', 'abc-ab')
('((a)(b)c)(d)', 'abcd', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'abc-a-b-d')
('[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', 0, 'found', 'alpha')
('^a(bc+|b[eh])g|.h$', 'abh', 0, 'found+"-"+g1', 'bh-None')
('(bc+d$|ef*g.|h?i(j|k))', 'effgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None')
('(bc+d$|ef*g.|h?i(j|k))', 'ij', 0, 'found+"-"+g1+"-"+g2', 'ij-ij-j')
('(bc+d$|ef*g.|h?i(j|k))', 'effg', 1)
('(bc+d$|ef*g.|h?i(j|k))', 'bcdd', 1)
('(bc+d$|ef*g.|h?i(j|k))', 'reffgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None')
('(((((((((a)))))))))', 'a', 0, 'found', 'a')
('multiple words of text', 'uh-uh', 1)
('multiple words', 'multiple words, yeah', 0, 'found', 'multiple words')
('(.*)c(.*)', 'abcde', 0, 'found+"-"+g1+"-"+g2', 'abcde-ab-de')
('\\((.*), (.*)\\)', '(a, b)', 0, 'g2+"-"+g1', 'b-a')
('[k]', 'ab', 1)
('a[-]?c', 'ac', 0, 'found', 'ac')
('(abc)\\1', 'abcabc', 0, 'g1', 'abc')
('([a-c]*)\\1', 'abcabc', 0, 'g1', 'abc')
('^(.+)?B', 'AB', 0, 'g1', 'A')
('(a+).\\1$', 'aaaaa', 0, 'found+"-"+g1', 'aaaaa-aa')
('^(a+).\\1$', 'aaaa', 1)
('(abc)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc')
('([a-c]+)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc')
('(a)\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
('(a+)\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
('(a).+\\1', 'aba', 0, 'found+"-"+g1', 'aba-a')
('(a)ba*\\1', 'aba', 0, 'found+"-"+g1', 'aba-a')
('(aa|a)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a')
('(a|aa)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a')
('(a+)a\\1$', 'aaa', 0, 'found+"-"+g1', 'aaa-a')
('([abc]*)\\1', 'abcabc', 0, 'found+"-"+g1', 'abcabc-abc')
('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None')
('(a)+x', 'aaax', 0, 'found+"-"+g1', 'aaax-a')
('([ac])+x', 'aacx', 0, 'found+"-"+g1', 'aacx-c')
('([^/]*/)*sub1/', 'd:msgs/tdir/sub1/trial/away.cpp', 0, 'found+"-"+g1', 'd:msgs/tdir/sub1/-tdir/')
('([^.]*)\\.([^:]*):[T ]+(.*)', 'track1.title:TBlah blah blah', 0, 'found+"-"+g1+"-"+g2+"-"+g3', 'track1.title:TBlah blah blah-track1-title-Blah blah blah')
('([^N]*N)+', 'abNNxyzN', 0, 'found+"-"+g1', 'abNNxyzN-xyzN')
('([^N]*N)+', 'abNNxyz', 0, 'found+"-"+g1', 'abNN-N')
('([abc]*)x', 'abcx', 0, 'found+"-"+g1', 'abcx-abc')
('([abc]*)x', 'abc', 1)
('([xyz]*)x', 'abcx', 0, 'found+"-"+g1', 'x-')
('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None')
('(?P<i d>aaa)a', 'aaaa', 2)
('(?P<id>aaa)a', 'aaaa', 0, 'found+"-"+id', 'aaaa-aaa')
('(?P<id>aa)(?P=id)', 'aaaa', 0, 'found+"-"+id', 'aaaa-aa')
('(?P<id>aa)(?P=xd)', 'aaaa', 2)
('\\1', 'a', 2)
('\\09', '\0009', 0, 'found', '\0009')
('\\141', 'a', 0, 'found', 'a')
('(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)\\119', 'abcdefghijklk9', 0, 'found+"-"+g11', 'abcdefghijklk9-k')
('abc', 'abc', 0, 'found', 'abc')
('abc', 'xbc', 1)
('abc', 'axc', 1)
('abc', 'abx', 1)
('abc', 'xabcy', 0, 'found', 'abc')
('abc', 'ababc', 0, 'found', 'abc')
('ab*c', 'abc', 0, 'found', 'abc')
('ab*bc', 'abc', 0, 'found', 'abc')
('ab*bc', 'abbc', 0, 'found', 'abbc')
('ab*bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab{0,}bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab+bc', 'abbc', 0, 'found', 'abbc')
('ab+bc', 'abc', 1)
('ab+bc', 'abq', 1)
('ab{1,}bc', 'abq', 1)
('ab+bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab{1,}bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab{1,3}bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab{3,4}bc', 'abbbbc', 0, 'found', 'abbbbc')
('ab{4,5}bc', 'abbbbc', 1)
('ab?bc', 'abbc', 0, 'found', 'abbc')
('ab?bc', 'abc', 0, 'found', 'abc')
('ab{0,1}bc', 'abc', 0, 'found', 'abc')
('ab?bc', 'abbbbc', 1)
('ab?c', 'abc', 0, 'found', 'abc')
('ab{0,1}c', 'abc', 0, 'found', 'abc')
('^abc$', 'abc', 0, 'found', 'abc')
('^abc$', 'abcc', 1)
('^abc', 'abcc', 0, 'found', 'abc')
('^abc$', 'aabc', 1)
('abc$', 'aabc', 0, 'found', 'abc')
('^', 'abc', 0, 'found', '')
('$', 'abc', 0, 'found', '')
('a.c', 'abc', 0, 'found', 'abc')
('a.c', 'axc', 0, 'found', 'axc')
('a.*c', 'axyzc', 0, 'found', 'axyzc')
('a.*c', 'axyzd', 1)
('a[bc]d', 'abc', 1)
('a[bc]d', 'abd', 0, 'found', 'abd')
('a[b-d]e', 'abd', 1)
('a[b-d]e', 'ace', 0, 'found', 'ace')
('a[b-d]', 'aac', 0, 'found', 'ac')
('a[-b]', 'a-', 0, 'found', 'a-')
('a[b-]', 'a-', 0, 'found', 'a-')
('a[b-a]', '-', 2)
('a[]b', '-', 2)
('a[', '-', 2)
('a]', 'a]', 0, 'found', 'a]')
('a[]]b', 'a]b', 0, 'found', 'a]b')
('a[^bc]d', 'aed', 0, 'found', 'aed')
('a[^bc]d', 'abd', 1)
('a[^-b]c', 'adc', 0, 'found', 'adc')
('a[^-b]c', 'a-c', 1)
('a[^]b]c', 'a]c', 1)
('a[^]b]c', 'adc', 0, 'found', 'adc')
('ab|cd', 'abc', 0, 'found', 'ab')
('ab|cd', 'abcd', 0, 'found', 'ab')
('()ef', 'def', 0, 'found+"-"+g1', 'ef-')
('*a', '-', 2)
('(*)b', '-', 2)
('$b', 'b', 1)
('a\\', '-', 2)
('a\\(b', 'a(b', 0, 'found+"-"+g1', 'a(b-Error')
('a\\(*b', 'ab', 0, 'found', 'ab')
('a\\(*b', 'a((b', 0, 'found', 'a((b')
('a\\\\b', 'a\\b', 0, 'found', 'a\\b')
('abc)', '-', 2)
('(abc', '-', 2)
('((a))', 'abc', 0, 'found+"-"+g1+"-"+g2', 'a-a-a')
('(a)b(c)', 'abc', 0, 'found+"-"+g1+"-"+g2', 'abc-a-c')
('a+b+c', 'aabbabc', 0, 'found', 'abc')
('a{1,}b{1,}c', 'aabbabc', 0, 'found', 'abc')
('a**', '-', 2)
('a.+?c', 'abcabc', 0, 'found', 'abc')
('(a+|b)*', 'ab', 0, 'found+"-"+g1', 'ab-b')
('(a+|b){0,}', 'ab', 0, 'found+"-"+g1', 'ab-b')
('(a+|b)+', 'ab', 0, 'found+"-"+g1', 'ab-b')
('(a+|b){1,}', 'ab', 0, 'found+"-"+g1', 'ab-b')
('(a+|b)?', 'ab', 0, 'found+"-"+g1', 'a-a')
('(a+|b){0,1}', 'ab', 0, 'found+"-"+g1', 'a-a')
(')(', '-', 2)
('[^ab]*', 'cde', 0, 'found', 'cde')
('abc', '', 1)
('a*', '', 0, 'found', '')
('([abc])*d', 'abbbcd', 0, 'found+"-"+g1', 'abbbcd-c')
('([abc])*bcd', 'abcd', 0, 'found+"-"+g1', 'abcd-a')
('a|b|c|d|e', 'e', 0, 'found', 'e')
('(a|b|c|d|e)f', 'ef', 0, 'found+"-"+g1', 'ef-e')
('abcd*efg', 'abcdefg', 0, 'found', 'abcdefg')
('ab*', 'xabyabbbz', 0, 'found', 'ab')
('ab*', 'xayabbbz', 0, 'found', 'a')
('(ab|cd)e', 'abcde', 0, 'found+"-"+g1', 'cde-cd')
('[abhgefdc]ij', 'hij', 0, 'found', 'hij')
('^(ab|cd)e', 'abcde', 1)
('(abc|)ef', 'abcdef', 0, 'found+"-"+g1', 'ef-')
('(a|b)c*d', 'abcd', 0, 'found+"-"+g1', 'bcd-b')
('(ab|ab*)bc', 'abc', 0, 'found+"-"+g1', 'abc-a')
('a([bc]*)c*', 'abc', 0, 'found+"-"+g1', 'abc-bc')
('a([bc]*)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d')
('a([bc]+)(c*d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-bc-d')
('a([bc]*)(c+d)', 'abcd', 0, 'found+"-"+g1+"-"+g2', 'abcd-b-cd')
('a[bcd]*dcdcde', 'adcdcde', 0, 'found', 'adcdcde')
('a[bcd]+dcdcde', 'adcdcde', 1)
('(ab|a)b*c', 'abc', 0, 'found+"-"+g1', 'abc-ab')
('((a)(b)c)(d)', 'abcd', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'abc-a-b-d')
('[a-zA-Z_][a-zA-Z0-9_]*', 'alpha', 0, 'found', 'alpha')
('^a(bc+|b[eh])g|.h$', 'abh', 0, 'found+"-"+g1', 'bh-None')
('(bc+d$|ef*g.|h?i(j|k))', 'effgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None')
('(bc+d$|ef*g.|h?i(j|k))', 'ij', 0, 'found+"-"+g1+"-"+g2', 'ij-ij-j')
('(bc+d$|ef*g.|h?i(j|k))', 'effg', 1)
('(bc+d$|ef*g.|h?i(j|k))', 'bcdd', 1)
('(bc+d$|ef*g.|h?i(j|k))', 'reffgz', 0, 'found+"-"+g1+"-"+g2', 'effgz-effgz-None')
('((((((((((a))))))))))', 'a', 0, 'g10', 'a')
('((((((((((a))))))))))\\10', 'aa', 0, 'found', 'aa')
('((((((((((a))))))))))\\41', '', 2)
('(((((((((a)))))))))', 'a', 0, 'found', 'a')
('multiple words of text', 'uh-uh', 1)
('multiple words', 'multiple words, yeah', 0, 'found', 'multiple words')
('(.*)c(.*)', 'abcde', 0, 'found+"-"+g1+"-"+g2', 'abcde-ab-de')
('\\((.*), (.*)\\)', '(a, b)', 0, 'g2+"-"+g1', 'b-a')
('[k]', 'ab', 1)
('a[-]?c', 'ac', 0, 'found', 'ac')
('(abc)\\1', 'abcabc', 0, 'g1', 'abc')
('([a-c]*)\\1', 'abcabc', 0, 'g1', 'abc')
('(?i)abc', 'ABC', 0, 'found', 'ABC')
('(?i)abc', 'XBC', 1)
('(?i)abc', 'AXC', 1)
('(?i)abc', 'ABX', 1)
('(?i)abc', 'XABCY', 0, 'found', 'ABC')
('(?i)abc', 'ABABC', 0, 'found', 'ABC')
('(?i)ab*c', 'ABC', 0, 'found', 'ABC')
('(?i)ab*bc', 'ABC', 0, 'found', 'ABC')
('(?i)ab*bc', 'ABBC', 0, 'found', 'ABBC')
('(?i)ab*?bc', 'ABBBBC', 0, 'found', 'ABBBBC')
('(?i)ab{0,}?bc', 'ABBBBC', 0, 'found', 'ABBBBC')
('(?i)ab+?bc', 'ABBC', 0, 'found', 'ABBC')
('(?i)ab+bc', 'ABC', 1)
('(?i)ab+bc', 'ABQ', 1)
('(?i)ab{1,}bc', 'ABQ', 1)
('(?i)ab+bc', 'ABBBBC', 0, 'found', 'ABBBBC')
('(?i)ab{1,}?bc', 'ABBBBC', 0, 'found', 'ABBBBC')
('(?i)ab{1,3}?bc', 'ABBBBC', 0, 'found', 'ABBBBC')
('(?i)ab{3,4}?bc', 'ABBBBC', 0, 'found', 'ABBBBC')
('(?i)ab{4,5}?bc', 'ABBBBC', 1)
('(?i)ab??bc', 'ABBC', 0, 'found', 'ABBC')
('(?i)ab??bc', 'ABC', 0, 'found', 'ABC')
('(?i)ab{0,1}?bc', 'ABC', 0, 'found', 'ABC')
('(?i)ab??bc', 'ABBBBC', 1)
('(?i)ab??c', 'ABC', 0, 'found', 'ABC')
('(?i)ab{0,1}?c', 'ABC', 0, 'found', 'ABC')
('(?i)^abc$', 'ABC', 0, 'found', 'ABC')
('(?i)^abc$', 'ABCC', 1)
('(?i)^abc', 'ABCC', 0, 'found', 'ABC')
('(?i)^abc$', 'AABC', 1)
('(?i)abc$', 'AABC', 0, 'found', 'ABC')
('(?i)^', 'ABC', 0, 'found', '')
('(?i)$', 'ABC', 0, 'found', '')
('(?i)a.c', 'ABC', 0, 'found', 'ABC')
('(?i)a.c', 'AXC', 0, 'found', 'AXC')
('(?i)a.*?c', 'AXYZC', 0, 'found', 'AXYZC')
('(?i)a.*c', 'AXYZD', 1)
('(?i)a[bc]d', 'ABC', 1)
('(?i)a[bc]d', 'ABD', 0, 'found', 'ABD')
('(?i)a[b-d]e', 'ABD', 1)
('(?i)a[b-d]e', 'ACE', 0, 'found', 'ACE')
('(?i)a[b-d]', 'AAC', 0, 'found', 'AC')
('(?i)a[-b]', 'A-', 0, 'found', 'A-')
('(?i)a[b-]', 'A-', 0, 'found', 'A-')
('(?i)a[b-a]', '-', 2)
('(?i)a[]b', '-', 2)
('(?i)a[', '-', 2)
('(?i)a]', 'A]', 0, 'found', 'A]')
('(?i)a[]]b', 'A]B', 0, 'found', 'A]B')
('(?i)a[^bc]d', 'AED', 0, 'found', 'AED')
('(?i)a[^bc]d', 'ABD', 1)
('(?i)a[^-b]c', 'ADC', 0, 'found', 'ADC')
('(?i)a[^-b]c', 'A-C', 1)
('(?i)a[^]b]c', 'A]C', 1)
('(?i)a[^]b]c', 'ADC', 0, 'found', 'ADC')
('(?i)ab|cd', 'ABC', 0, 'found', 'AB')
('(?i)ab|cd', 'ABCD', 0, 'found', 'AB')
('(?i)()ef', 'DEF', 0, 'found+"-"+g1', 'EF-')
('(?i)*a', '-', 2)
('(?i)(*)b', '-', 2)
('(?i)$b', 'B', 1)
('(?i)a\\', '-', 2)
('(?i)a\\(b', 'A(B', 0, 'found+"-"+g1', 'A(B-Error')
('(?i)a\\(*b', 'AB', 0, 'found', 'AB')
('(?i)a\\(*b', 'A((B', 0, 'found', 'A((B')
('(?i)a\\\\b', 'A\\B', 0, 'found', 'A\\B')
('(?i)abc)', '-', 2)
('(?i)(abc', '-', 2)
('(?i)((a))', 'ABC', 0, 'found+"-"+g1+"-"+g2', 'A-A-A')
('(?i)(a)b(c)', 'ABC', 0, 'found+"-"+g1+"-"+g2', 'ABC-A-C')
('(?i)a+b+c', 'AABBABC', 0, 'found', 'ABC')
('(?i)a{1,}b{1,}c', 'AABBABC', 0, 'found', 'ABC')
('(?i)a**', '-', 2)
('(?i)a.+?c', 'ABCABC', 0, 'found', 'ABC')
('(?i)a.*?c', 'ABCABC', 0, 'found', 'ABC')
('(?i)a.{0,5}?c', 'ABCABC', 0, 'found', 'ABC')
('(?i)(a+|b)*', 'AB', 0, 'found+"-"+g1', 'AB-B')
('(?i)(a+|b){0,}', 'AB', 0, 'found+"-"+g1', 'AB-B')
('(?i)(a+|b)+', 'AB', 0, 'found+"-"+g1', 'AB-B')
('(?i)(a+|b){1,}', 'AB', 0, 'found+"-"+g1', 'AB-B')
('(?i)(a+|b)?', 'AB', 0, 'found+"-"+g1', 'A-A')
('(?i)(a+|b){0,1}', 'AB', 0, 'found+"-"+g1', 'A-A')
('(?i)(a+|b){0,1}?', 'AB', 0, 'found+"-"+g1', '-None')
('(?i))(', '-', 2)
('(?i)[^ab]*', 'CDE', 0, 'found', 'CDE')
('(?i)abc', '', 1)
('(?i)a*', '', 0, 'found', '')
('(?i)([abc])*d', 'ABBBCD', 0, 'found+"-"+g1', 'ABBBCD-C')
('(?i)([abc])*bcd', 'ABCD', 0, 'found+"-"+g1', 'ABCD-A')
('(?i)a|b|c|d|e', 'E', 0, 'found', 'E')
('(?i)(a|b|c|d|e)f', 'EF', 0, 'found+"-"+g1', 'EF-E')
('(?i)abcd*efg', 'ABCDEFG', 0, 'found', 'ABCDEFG')
('(?i)ab*', 'XABYABBBZ', 0, 'found', 'AB')
('(?i)ab*', 'XAYABBBZ', 0, 'found', 'A')
('(?i)(ab|cd)e', 'ABCDE', 0, 'found+"-"+g1', 'CDE-CD')
('(?i)[abhgefdc]ij', 'HIJ', 0, 'found', 'HIJ')
('(?i)^(ab|cd)e', 'ABCDE', 1)
('(?i)(abc|)ef', 'ABCDEF', 0, 'found+"-"+g1', 'EF-')
('(?i)(a|b)c*d', 'ABCD', 0, 'found+"-"+g1', 'BCD-B')
('(?i)(ab|ab*)bc', 'ABC', 0, 'found+"-"+g1', 'ABC-A')
('(?i)a([bc]*)c*', 'ABC', 0, 'found+"-"+g1', 'ABC-BC')
('(?i)a([bc]*)(c*d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-BC-D')
('(?i)a([bc]+)(c*d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-BC-D')
('(?i)a([bc]*)(c+d)', 'ABCD', 0, 'found+"-"+g1+"-"+g2', 'ABCD-B-CD')
('(?i)a[bcd]*dcdcde', 'ADCDCDE', 0, 'found', 'ADCDCDE')
('(?i)a[bcd]+dcdcde', 'ADCDCDE', 1)
('(?i)(ab|a)b*c', 'ABC', 0, 'found+"-"+g1', 'ABC-AB')
('(?i)((a)(b)c)(d)', 'ABCD', 0, 'g1+"-"+g2+"-"+g3+"-"+g4', 'ABC-A-B-D')
('(?i)[a-zA-Z_][a-zA-Z0-9_]*', 'ALPHA', 0, 'found', 'ALPHA')
('(?i)^a(bc+|b[eh])g|.h$', 'ABH', 0, 'found+"-"+g1', 'BH-None')
('(?i)(bc+d$|ef*g.|h?i(j|k))', 'EFFGZ', 0, 'found+"-"+g1+"-"+g2', 'EFFGZ-EFFGZ-None')
('(?i)(bc+d$|ef*g.|h?i(j|k))', 'IJ', 0, 'found+"-"+g1+"-"+g2', 'IJ-IJ-J')
('(?i)(bc+d$|ef*g.|h?i(j|k))', 'EFFG', 1)
('(?i)(bc+d$|ef*g.|h?i(j|k))', 'BCDD', 1)
('(?i)(bc+d$|ef*g.|h?i(j|k))', 'REFFGZ', 0, 'found+"-"+g1+"-"+g2', 'EFFGZ-EFFGZ-None')
('(?i)((((((((((a))))))))))', 'A', 0, 'g10', 'A')
('(?i)((((((((((a))))))))))\\10', 'AA', 0, 'found', 'AA')
('(?i)((((((((((a))))))))))\\41', '', 2)
('(?i)(((((((((a)))))))))', 'A', 0, 'found', 'A')
('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))', 'A', 0, 'g1', 'A')
('(?i)(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))', 'C', 0, 'g1', 'C')
('(?i)multiple words of text', 'UH-UH', 1)
('(?i)multiple words', 'MULTIPLE WORDS, YEAH', 0, 'found', 'MULTIPLE WORDS')
('(?i)(.*)c(.*)', 'ABCDE', 0, 'found+"-"+g1+"-"+g2', 'ABCDE-AB-DE')
('(?i)\\((.*), (.*)\\)', '(A, B)', 0, 'g2+"-"+g1', 'B-A')
('(?i)[k]', 'AB', 1)
('(?i)a[-]?c', 'AC', 0, 'found', 'AC')
('(?i)(abc)\\1', 'ABCABC', 0, 'g1', 'ABC')
('(?i)([a-c]*)\\1', 'ABCABC', 0, 'g1', 'ABC')
('a(?:b|c|d)(.)', 'ace', 0, 'g1', 'e')
('a(?:b|c|d)*(.)', 'ace', 0, 'g1', 'e')
('a(?:b|c|d)+?(.)', 'ace', 0, 'g1', 'e')
('a(?:b|(c|e){1,2}?|d)+?(.)', 'ace', 0, 'g1 + g2', 'ce')
('^(.+)?B', 'AB', 0, 'g1', 'A')
('w(?# comment', 'w', 2)
('w(?# comment 1)xy(?# comment 2)z', 'wxyz', 0, 'found', 'wxyz')
('w(?i)', 'W', 2)
('(?x)w# comment 1\012        x y\012\011# comment 2\012\011z', 'wxyz', 0, 'found', 'wxyz')
('^abc', 'jkl\012abc\012xyz', 1)
('(?m)^abc', 'jkl\012abc\012xyz', 0, 'found', 'abc')
('(?m)abc$', 'jkl\012xyzabc\012123', 0, 'found', 'abc')
('a.b', 'a\012b', 1)
('(?s)a.b', 'a\012b', 0, 'found', 'a\012b')
('\\w+', '--ab_cd0123--', 0, 'found', 'ab_cd0123')
('\\D+', '1234abc5678', 0, 'found', 'abc')
('[\\da-fA-F]+', '123abc', 0, 'found', '123abc')
('[\\d-x]', '-', 2)