summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/regex/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/regress/lib/libc/regex/tests612
1 files changed, 0 insertions, 612 deletions
diff --git a/src/regress/lib/libc/regex/tests b/src/regress/lib/libc/regex/tests
deleted file mode 100644
index f3fd9d0e6b..0000000000
--- a/src/regress/lib/libc/regex/tests
+++ /dev/null
@@ -1,612 +0,0 @@
1# $OpenBSD: tests,v 1.10 2021/04/02 14:20:57 otto Exp $
2# $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $
3
4# regular expression test set
5# Lines are at least three fields, separated by one or more tabs. "" stands
6# for an empty field. First field is an RE. Second field is flags. If
7# C flag given, regcomp() is expected to fail, and the third field is the
8# error name (minus the leading REG_).
9#
10# Otherwise it is expected to succeed, and the third field is the string to
11# try matching it against. If there is no fourth field, the match is
12# expected to fail. If there is a fourth field, it is the substring that
13# the RE is expected to match. If there is a fifth field, it is a comma-
14# separated list of what the subexpressions should match, with - indicating
15# no match for that one. In both the fourth and fifth fields, a (sub)field
16# starting with @ indicates that the (sub)expression is expected to match
17# a null string followed by the stuff after the @; this provides a way to
18# test where null strings match. The character `N' in REs and strings
19# is newline, `S' is space, `T' is tab, `Z' is NUL.
20#
21# The full list of flags:
22# - placeholder, does nothing
23# b RE is a BRE, not an ERE
24# & try it as both an ERE and a BRE
25# C regcomp() error expected, third field is error name
26# i REG_ICASE
27# m ("mundane") REG_NOSPEC
28# s REG_NOSUB (not really testable)
29# n REG_NEWLINE
30# ^ REG_NOTBOL
31# $ REG_NOTEOL
32# # REG_STARTEND (see below)
33# p REG_PEND
34#
35# For REG_STARTEND, the start/end offsets are those of the substring
36# enclosed in ().
37
38# basics
39a & a a
40abc & abc abc
41abc|de - abc abc
42a|b|c - abc a
43
44# parentheses and perversions thereof
45a(b)c - abc abc
46a\(b\)c b abc abc
47a( C EPAREN
48a( b a( a(
49a\( - a( a(
50a\( bC EPAREN
51a\(b bC EPAREN
52a(b C EPAREN
53a(b b a(b a(b
54# gag me with a right parenthesis -- 1003.2 goofed here (my fault, partly)
55a) - a) a)
56) - ) )
57# end gagging (in a just world, those *should* give EPAREN)
58a) b a) a)
59a\) bC EPAREN
60\) bC EPAREN
61a()b - ab ab
62a\(\)b b ab ab
63
64# anchoring and REG_NEWLINE
65^abc$ & abc abc
66^b & abc
67a^b - a^b
68a^b b a^b a^b
69a$b - a$b
70a$b b a$b a$b
71^ & abc @abc
72$ & abc @
73^$ & "" @
74$^ - "" @
75\($\)\(^\) b "" @
76# stop retching, those are legitimate (although disgusting)
77^^ - "" @
78$$ - "" @
79b$ & abNc
80b$ &n abNc b
81^b & aNbNc
82b$ & aNbNc
83^a &n aNb a
84^b &n abc
85^b$ &n aNbNc b
86^$ &n aNNb @Nb
87^$ n abc
88^$ n abcN @
89$^ n aNNb @Nb
90\($\)\(^\) bn aNNb @Nb
91^^ n^ aNNb @Nb
92$$ n aNNb @NN
93^a &^ a
94a$ &$ a
95^b &^ abc
96^b &^ aNb
97^a &^n aNb
98^b &^n abc
99^b &^n aNb b
100a$ &$n bNa
101b$ &$n bNa b
102a*(^b$)c* - b b
103a*\(^b$\)c* b b b
104
105# certain syntax errors and non-errors
106| C EMPTY
107| b | |
108* C BADRPT
109* b * *
110+ C BADRPT
111? C BADRPT
112"" &C EMPTY
113() - abc @abc
114\(\) b abc @abc
115a||b C EMPTY
116|ab C EMPTY
117ab| C EMPTY
118(|a)b C EMPTY
119(a|)b C EMPTY
120(*a) C BADRPT
121(+a) C BADRPT
122(?a) C BADRPT
123({1}a) C BADRPT
124\(\{1\}a\) bC BADRPT
125(a|*b) C BADRPT
126(a|+b) C BADRPT
127(a|?b) C BADRPT
128(a|{1}b) C BADRPT
129^* C BADRPT
130^* b * *
131^+ C BADRPT
132^? C BADRPT
133^{1} C BADRPT
134^\{1\} bC BADRPT
135
136# metacharacters, backslashes
137a.c & abc abc
138a[bc]d & abd abd
139a\*c & a*c a*c
140a\\b & a\b a\b
141a\\\*b & a\*b a\*b
142a\bc & abc abc
143a\ &C EESCAPE
144a\\bc & a\bc a\bc
145\{ bC BADRPT
146a\[b & a[b a[b
147a[b &C EBRACK
148# trailing $ is a peculiar special case for the BRE code
149a$ & a a
150a$ & a$
151a\$ & a
152a\$ & a$ a$
153a\\$ & a
154a\\$ & a$
155a\\$ & a\$
156a\\$ & a\ a\
157
158# back references, ugh
159a\(b\)\2c bC ESUBREG
160a\(b\1\)c bC ESUBREG
161a\(b*\)c\1d b abbcbbd abbcbbd bb
162a\(b*\)c\1d b abbcbd
163a\(b*\)c\1d b abbcbbbd
164^\(.\)\1 b abc
165a\([bc]\)\1d b abcdabbd abbd b
166a\(\([bc]\)\2\)*d b abbccd abbccd
167a\(\([bc]\)\2\)*d b abbcbd
168# actually, this next one probably ought to fail, but the spec is unclear
169a\(\(b\)*\2\)*d b abbbd abbbd
170# here is a case that no NFA implementation does right
171\(ab*\)[ab]*\1 b ababaaa ababaaa a
172# check out normal matching in the presence of back refs
173\(a\)\1bcd b aabcd aabcd
174\(a\)\1bc*d b aabcd aabcd
175\(a\)\1bc*d b aabd aabd
176\(a\)\1bc*d b aabcccd aabcccd
177\(a\)\1bc*[ce]d b aabcccd aabcccd
178^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd
179\(b*\)\(a*\1\)* b ab a
180\([^_]*\)\(_*\1\)* b foo_foo_bar_bar_bar_baz foo_foo foo,_foo
181\([^_]*\)\(_*\1\)* b bar_bar_bar_baz bar_bar_bar bar,_bar
182\([^_]*\)\(_*\1\)* b foo_bar_baz foo foo
183\(.*\)\1 b "" ""
184\(.*\)\1 b a ""
185\(.*\)\1 b aa aa
186\(.*\)\1 b aaa aa
187\(.*\)\1 b aaaa aaaa
188\([^_]*\)\1 b "" ""
189\([^_]*\)\1 b a ""
190\([^_]*\)\1 b aa aa
191\([^_]*\)\1 b aaa aa
192\([^_]*\)\1 b aaaa aaaa
193foo\(.*\)bar\1 b foolbarl foolbarl l
194foo\(.*\)bar\1 b foobar foobar ""
195\(\(.\)b\)*\1 b aba
196\(\(.\)b\)*\1 b abba
197\(\(.\)b\)*\1 b abbba
198\(\(.\)b\)*\1 b abbbba bbbb bb,b
199\(\(.\)b\)*\1 b abbbbba abbbbb bb,b
200\(\(.\)b\)*\1 b abbbbbba abbbbb bb,b
201\(\(.\)b\)*\1 b abbbbbbbbbbbbbba abbbbbbbbbbbbb bb,b
202\(\(.\)b\)*\1 b abbbbbbbbbbbbbbba abbbbbbbbbbbbbbb bb,b
203# these used to segfault, buffer underflow in engine.c, backref()
204\(^a\)*\(b.\)\2 b^ sbxbxe bxbx -,bx
205\([[:<:]]a\)*\(b.\)\2 b^ sbxbxe bxbx -,bx
206
207# ordinary repetitions
208ab*c & abc abc
209ab+c - abc abc
210ab?c - abc abc
211a\(*\)b b a*b a*b
212a\(**\)b b ab ab
213a\(***\)b bC BADRPT
214*a b *a *a
215**a b a a
216***a bC BADRPT
217
218# the dreaded bounded repetitions
219{ & { {
220{abc & {abc {abc
221{1 C BADRPT
222{1} C BADRPT
223a{b & a{b a{b
224a{1}b - ab ab
225a\{1\}b b ab ab
226a{1,}b - ab ab
227a\{1,\}b b ab ab
228a{1,2}b - aab aab
229a\{1,2\}b b aab aab
230a{1 C EBRACE
231a\{1 bC EBRACE
232a{1a C EBRACE
233a\{1a bC EBRACE
234a{1a} C BADBR
235a\{1a\} bC BADBR
236a{,2} - a{,2} a{,2}
237a\{,2\} bC BADBR
238a{,} - a{,} a{,}
239a\{,\} bC BADBR
240a{1,x} C BADBR
241a\{1,x\} bC BADBR
242a{1,x C EBRACE
243a\{1,x bC EBRACE
244a{300} C BADBR
245a\{300\} bC BADBR
246a{1,0} C BADBR
247a\{1,0\} bC BADBR
248ab{0,0}c - abcac ac
249ab\{0,0\}c b abcac ac
250ab{0,1}c - abcac abc
251ab\{0,1\}c b abcac abc
252ab{0,3}c - abbcac abbc
253ab\{0,3\}c b abbcac abbc
254ab{1,1}c - acabc abc
255ab\{1,1\}c b acabc abc
256ab{1,3}c - acabc abc
257ab\{1,3\}c b acabc abc
258ab{2,2}c - abcabbc abbc
259ab\{2,2\}c b abcabbc abbc
260ab{2,4}c - abcabbc abbc
261ab\{2,4\}c b abcabbc abbc
262((a{1,10}){1,10}){1,10} - a a a,a
263
264# multiple repetitions
265a** &C BADRPT
266a++ C BADRPT
267a?? C BADRPT
268a*+ C BADRPT
269a*? C BADRPT
270a+* C BADRPT
271a+? C BADRPT
272a?* C BADRPT
273a?+ C BADRPT
274a{1}{1} C BADRPT
275a*{1} C BADRPT
276a+{1} C BADRPT
277a?{1} C BADRPT
278a{1}* C BADRPT
279a{1}+ C BADRPT
280a{1}? C BADRPT
281a*{b} - a{b} a{b}
282a\{1\}\{1\} bC BADRPT
283a*\{1\} bC BADRPT
284a\{1\}* bC BADRPT
285
286# brackets, and numerous perversions thereof
287a[b]c & abc abc
288a[ab]c & abc abc
289a[^ab]c & adc adc
290a[]b]c & a]c a]c
291a[[b]c & a[c a[c
292a[-b]c & a-c a-c
293a[^]b]c & adc adc
294a[^-b]c & adc adc
295a[b-]c & a-c a-c
296a[b &C EBRACK
297a[] &C EBRACK
298a[1-3]c & a2c a2c
299a[3-1]c &C ERANGE
300a[1-3-5]c &C ERANGE
301a[[.-.]--]c & a-c a-c
302a[1- &C ERANGE
303a[[. &C EBRACK
304a[[.x &C EBRACK
305a[[.x. &C EBRACK
306a[[.x.] &C EBRACK
307a[[.x.]] & ax ax
308a[[.x,.]] &C ECOLLATE
309a[[.one.]]b & a1b a1b
310a[[.notdef.]]b &C ECOLLATE
311a[[.].]]b & a]b a]b
312a[[:alpha:]]c & abc abc
313a[[:notdef:]]c &C ECTYPE
314a[[: &C EBRACK
315a[[:alpha &C EBRACK
316a[[:alpha:] &C EBRACK
317a[[:alpha,:] &C ECTYPE
318a[[:]:]]b &C ECTYPE
319a[[:-:]]b &C ECTYPE
320a[[:alph:]] &C ECTYPE
321a[[:alphabet:]] &C ECTYPE
322[[:alnum:]]+ - -%@a0X- a0X
323[[:alpha:]]+ - -%@aX0- aX
324[[:blank:]]+ - aSSTb SST
325[[:cntrl:]]+ - aNTb NT
326[[:digit:]]+ - a019b 019
327[[:graph:]]+ - Sa%bS a%b
328[[:lower:]]+ - AabC ab
329[[:print:]]+ - NaSbN aSb
330[[:punct:]]+ - S%-&T %-&
331[[:space:]]+ - aSNTb SNT
332[[:upper:]]+ - aBCd BC
333[[:xdigit:]]+ - p0f3Cq 0f3C
334a[[=b=]]c & abc abc
335a[[= &C EBRACK
336a[[=b &C EBRACK
337a[[=b= &C EBRACK
338a[[=b=] &C EBRACK
339a[[=b,=]] &C ECOLLATE
340a[[=one=]]b & a1b a1b
341
342# complexities
343a(((b)))c - abc abc
344a(b|(c))d - abd abd
345a(b*|c)d - abbd abbd
346# just gotta have one DFA-buster, of course
347a[ab]{20} - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab
348# and an inline expansion in case somebody gets tricky
349a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab] - aaaaabaaaabaaaabaaaab aaaaabaaaabaaaabaaaab
350# and in case somebody just slips in an NFA...
351a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night) - aaaaabaaaabaaaabaaaabweeknights aaaaabaaaabaaaabaaaabweeknights
352# fish for anomalies as the number of states passes 32
35312345678901234567890123456789 - a12345678901234567890123456789b 12345678901234567890123456789
354123456789012345678901234567890 - a123456789012345678901234567890b 123456789012345678901234567890
3551234567890123456789012345678901 - a1234567890123456789012345678901b 1234567890123456789012345678901
35612345678901234567890123456789012 - a12345678901234567890123456789012b 12345678901234567890123456789012
357123456789012345678901234567890123 - a123456789012345678901234567890123b 123456789012345678901234567890123
358# and one really big one, beyond any plausible word width
3591234567890123456789012345678901234567890123456789012345678901234567890 - a1234567890123456789012345678901234567890123456789012345678901234567890b 1234567890123456789012345678901234567890123456789012345678901234567890
360# fish for problems as brackets go past 8
361[ab][cd][ef][gh][ij][kl][mn] - xacegikmoq acegikm
362[ab][cd][ef][gh][ij][kl][mn][op] - xacegikmoq acegikmo
363[ab][cd][ef][gh][ij][kl][mn][op][qr] - xacegikmoqy acegikmoq
364[ab][cd][ef][gh][ij][kl][mn][op][q] - xacegikmoqy acegikmoq
365
366# subtleties of matching
367abc & xabcy abc
368a\(b\)?c\1d b acd
369aBc i Abc Abc
370a[Bc]*d i abBCcd abBCcd
3710[[:upper:]]1 &i 0a1 0a1
3720[[:lower:]]1 &i 0A1 0A1
373a[^b]c &i abc
374a[^b]c &i aBc
375a[^b]c &i adc adc
376[a]b[c] - abc abc
377[a]b[a] - aba aba
378[abc]b[abc] - abc abc
379[abc]b[abd] - abd abd
380a(b?c)+d - accd accd
381(wee|week)(knights|night) - weeknights weeknights
382(we|wee|week|frob)(knights|night|day) - weeknights weeknights
383a[bc]d - xyzaaabcaababdacd abd
384a[ab]c - aaabc abc
385abc s abc abc
386a* & b @b
387
388# Let's have some fun -- try to match a C comment.
389# first the obvious, which looks okay at first glance...
390/\*.*\*/ - /*x*/ /*x*/
391# but...
392/\*.*\*/ - /*x*/y/*z*/ /*x*/y/*z*/
393# okay, we must not match */ inside; try to do that...
394/\*([^*]|\*[^/])*\*/ - /*x*/ /*x*/
395/\*([^*]|\*[^/])*\*/ - /*x*/y/*z*/ /*x*/
396# but...
397/\*([^*]|\*[^/])*\*/ - /*x**/y/*z*/ /*x**/y/*z*/
398# and a still fancier version, which does it right (I think)...
399/\*([^*]|\*+[^*/])*\*+/ - /*x*/ /*x*/
400/\*([^*]|\*+[^*/])*\*+/ - /*x*/y/*z*/ /*x*/
401/\*([^*]|\*+[^*/])*\*+/ - /*x**/y/*z*/ /*x**/
402/\*([^*]|\*+[^*/])*\*+/ - /*x****/y/*z*/ /*x****/
403/\*([^*]|\*+[^*/])*\*+/ - /*x**x*/y/*z*/ /*x**x*/
404/\*([^*]|\*+[^*/])*\*+/ - /*x***x/y/*z*/ /*x***x/y/*z*/
405
406# subexpressions
407a(b)(c)d - abcd abcd b,c
408a(((b)))c - abc abc b,b,b
409a(b|(c))d - abd abd b,-
410a(b*|c|e)d - abbd abbd bb
411a(b*|c|e)d - acd acd c
412a(b*|c|e)d - ad ad @d
413a(b?)c - abc abc b
414a(b?)c - ac ac @c
415a(b+)c - abc abc b
416a(b+)c - abbbc abbbc bbb
417a(b*)c - ac ac @c
418(a|ab)(bc([de]+)f|cde) - abcdef abcdef a,bcdef,de
419# the regression tester only asks for 9 subexpressions
420a(b)(c)(d)(e)(f)(g)(h)(i)(j)k - abcdefghijk abcdefghijk b,c,d,e,f,g,h,i,j
421a(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)l - abcdefghijkl abcdefghijkl b,c,d,e,f,g,h,i,j,k
422a([bc]?)c - abc abc b
423a([bc]?)c - ac ac @c
424a([bc]+)c - abc abc b
425a([bc]+)c - abcc abcc bc
426a([bc]+)bc - abcbc abcbc bc
427a(bb+|b)b - abb abb b
428a(bbb+|bb+|b)b - abb abb b
429a(bbb+|bb+|b)b - abbb abbb bb
430a(bbb+|bb+|b)bb - abbb abbb b
431(.*).* - abcdef abcdef abcdef
432(a*)* - bc @b @b
433
434# do we get the right subexpression when it is used more than once?
435a(b|c)*d - ad ad -
436a(b|c)*d - abcd abcd c
437a(b|c)+d - abd abd b
438a(b|c)+d - abcd abcd c
439a(b|c?)+d - ad ad @d
440a(b|c?)+d - abcd abcd @d
441a(b|c){0,0}d - ad ad -
442a(b|c){0,1}d - ad ad -
443a(b|c){0,1}d - abd abd b
444a(b|c){0,2}d - ad ad -
445a(b|c){0,2}d - abcd abcd c
446a(b|c){0,}d - ad ad -
447a(b|c){0,}d - abcd abcd c
448a(b|c){1,1}d - abd abd b
449a(b|c){1,1}d - acd acd c
450a(b|c){1,2}d - abd abd b
451a(b|c){1,2}d - abcd abcd c
452a(b|c){1,}d - abd abd b
453a(b|c){1,}d - abcd abcd c
454a(b|c){2,2}d - acbd acbd b
455a(b|c){2,2}d - abcd abcd c
456a(b|c){2,4}d - abcd abcd c
457a(b|c){2,4}d - abcbd abcbd b
458a(b|c){2,4}d - abcbcd abcbcd c
459a(b|c){2,}d - abcd abcd c
460a(b|c){2,}d - abcbd abcbd b
461a(b+|((c)*))+d - abd abd @d,@d,-
462a(b+|((c)*))+d - abcd abcd @d,@d,-
463
464# check out the STARTEND option
465^[abc] &# a(b)c b
466^[abc] &# a(xb)c
467^[abc] &# aN(b)c b
468^[abc] &n# a(b)c b
469^[abc] &n# a(xb)c
470^[abc] &n# aN(b)c b
471^[abc] &^# a(b)c
472^[abc] &^# a(xb)c
473^[abc] &^# aN(b)c
474^[abc] &n^# a(b)c
475^[abc] &n^# a(xb)c
476^[abc] &n^# aN(b)c b
477[abc] &# a(d)c
478[abc] &# a(bc)d b
479[abc] &# a(dc)d c
480. &# a()c
481b.*c &# b(bc)c bc
482b.* &# b(bc)c bc
483.*c &# b(bc)c bc
484
485# plain strings, with the NOSPEC flag
486abc m abc abc
487abc m xabcy abc
488abc m xyz
489a*b m aba*b a*b
490a*b m ab
491"" mC EMPTY
492
493# cases involving NULs
494aZb & a a
495aZb &p a
496aZb &p# (aZb) aZb
497aZ*b &p# (ab) ab
498a.b &# (aZb) aZb
499a.* &# (aZb)c aZb
500
501# word boundaries (ick)
502[[:<:]]a & a a
503\<a & a a
504[[:<:]]a & ba
505\<a & ba
506[[:<:]]a & -a a
507\<a & -a a
508[[:<:]]a & Na a
509\<a & Na a
510[[:<:]]a &n a a
511\<a &n a a
512[[:<:]]a &n ba
513\<a &n ba
514[[:<:]]a &n -a a
515\<a &n -a a
516[[:<:]]a &n Na a
517\<a &n Na a
518[[:<:]]a &^ a
519\<a &^ a
520[[:<:]]a &^ ba
521\<a &^ ba
522[[:<:]]a &^ -a a
523\<a &^ -a a
524[[:<:]]a &^ Na a
525\<a &^ Na a
526[[:<:]]a &n^ a
527\<a &n^ a
528[[:<:]]a &n^ ba
529\<a &n^ ba
530[[:<:]]a &n^ -a a
531\<a &n^ -a a
532[[:<:]]a &n^ Na a
533\<a &n^ Na a
534[[:<:]]b &# a(b)c b
535\<b &# a(b)c b
536[[:<:]]b &# a(xb)c
537\<b &# a(xb)c
538[[:<:]]b &# -(b)c b
539\<b &# -(b)c b
540[[:<:]]b &# aN(b)c b
541\<b &# aN(b)c b
542[[:<:]]b &n# a(b)c b
543\<b &n# a(b)c b
544[[:<:]]b &n# a(xb)c
545\<b &n# a(xb)c
546[[:<:]]b &n# -(b)c b
547\<b &n# -(b)c b
548[[:<:]]b &n# aN(b)c b
549\<b &n# aN(b)c b
550[[:<:]]b &^# a(b)c
551\<b &^# a(b)c
552[[:<:]]b &^# a(xb)c
553\<b &^# a(xb)c
554[[:<:]]b &^# -(b)c b
555\<b &^# -(b)c b
556[[:<:]]b &^# aN(b)c b
557\<b &^# aN(b)c b
558[[:<:]]b &n^# a(b)c
559\<b &n^# a(b)c
560[[:<:]]b &n^# a(xb)c
561\<b &n^# a(xb)c
562[[:<:]]b &n^# -(b)c b
563\<b &n^# -(b)c b
564[[:<:]]b &n^# aN(b)c b
565\<b &n^# aN(b)c b
566a[[:>:]] & a a
567a\> & a a
568a[[:>:]] & ab
569a\> & ab
570a[[:>:]] & a- a
571a\> & a- a
572[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc abc
573\<a.c\> & axcd-dayc-dazce-abc abc
574[[:<:]]a.c[[:>:]] & axcd-dayc-dazce-abc-q abc
575\<a.c\> & axcd-dayc-dazce-abc-q abc
576[[:<:]]a.c[[:>:]] & axc-dayc-dazce-abc axc
577\<a.c\> & axc-dayc-dazce-abc axc
578[[:<:]]b.c[[:>:]] & a_bxc-byc_d-bzc-q bzc
579\<b.c\> & a_bxc-byc_d-bzc-q bzc
580[[:<:]].x..[[:>:]] & y_xa_-_xb_y-_xc_-axdc _xc_
581\<.x..\> & y_xa_-_xb_y-_xc_-axdc _xc_
582[[:<:]]a_b[[:>:]] & x_a_b
583\<a_b\> & x_a_b
584
585# past problems, and suspected problems
586(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A]) - A1 A1
587abcdefghijklmnop i abcdefghijklmnop abcdefghijklmnop
588abcdefghijklmnopqrstuv i abcdefghijklmnopqrstuv abcdefghijklmnopqrstuv
589(ALAK)|(ALT[AB])|(CC[123]1)|(CM[123]1)|(GAMC)|(LC[23][EO ])|(SEM[1234])|(SL[ES][12])|(SLWW)|(SLF )|(SLDT)|(VWH[12])|(WH[34][EW])|(WP1[ESN]) - CC11 CC11
590CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a - CC11 CC11
591Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz
592a?b - ab ab
593-\{0,1\}[0-9]*$ b -5 -5
594
595# FreeBSD PR 130504
596(.|())(b) - ab ab
597(()|.)(b) - ab ab
598
599# Some BRE cases where \{0,\} makes a backref go wrong, as reported by Michael Paoli
600Y*\(x\)\1 b YYxx YYxx
601Y\{2,\}\(x\)\1 b YYxx YYxx
602# Fails currently
603#Y\{0,\}\(x\)\1 b YYxx YYxx
604Y\{0,\}\(x\) b YYxx YYx
605Y\{2,\}x\{1,\} b YYxx YYxx
606Y\{2,\}x\{0,\}z b YYxxz YYxxz
607Y\{0,\}x\{0,\}z b YYxxz YYxxz
608Y\{2,\}\(xy\)\1 b YYxyxy YYxyxy
609# Fails currently
610#Y\{0,\}\(xy\)\1 b YYxyxy YYxyxy
611Y*\(xy\)\1 b YYxyxy YYxyxy
612Y\{0,\}\(xy\)xy b YYxyxy YYxyxy