1 # Large number of macros in one regexp (Enhanced mode off)
2 E$ [A-Z]\\d\\s?\\d[A-Z]{2}|[A-Z]\\d{2}\\s?\\d[A-Z]{2}|[A-Z]{2}\\d\\s?\\d[A-Z]{2}|[A-Z]{2}\\d{2}\\s?\\d[A-Z]{2}|[A-Z]\\d[A-Z]\\s?\\d[A-Z]{2}|[A-Z]{2}\\d[A-Z]\\s?\\d[A-Z]{2}|[A-Z]{3}\\s?\\d[A-Z]{2} AdsdBC (0,6)
3 E a{11}(b{2}c){2} aaaaaaaaaaabbcbbc (0,17)(14,17)
4 E$ ^!packet [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3} [0-9]+ !packet 127.0.0.1 999 (0,21)
5 E$ ^!pfast [0-9]{1,15} ([0-9]{1,3}\\.){3}[0-9]{1,3}\\.[0-9]{1,5}$ !pfast 1234567890 127.0.0.1.1234 (0,32)(24,26)
6 # Should these match or not?
7 B \(a\)*-\1b aaa-b NOMATCH
8 B \(\(.*\)\1\)\{1,\} xxxxxx ESUBREG
9 # Basic string matching
11 E SAME xxxfoobarzapzot (3,9)
12 E aaaa xxaaaaaaaaaaaaaaaaa (2,6)
13 # Test zero length matches
14 E (a*) NULL (0,0)(0,0)
15 E (a*)* NULL (0,0)(0,0)
16 E ((a*)*)* NULL (0,0)(0,0)(0,0)
17 E (a*bcd)* aaaaaaaaaaaabcxbcxbcxaabcxaabcx (0,0)(?,?)
18 E SAME aaaaaaaaaaaabcxbcxbcxaabcxaabc (0,0)(?,?)
19 E SAME aaaaaaaaaaaabcxbcdbcxaabcxaabc (0,0)(?,?)
20 E SAME aaaaaaaaaaaabcdbcdbcxaabcxaabc (0,18)(15,18)
24 # Test for submatch addressing which requires arbitrary lookahead
25 E (a*)aaaaaa aaaaaaaaaaaaaaax (0,15)(0,9)
26 # Test leftmost and longest matching and some tricky submatches
27 E (a*)(a*) aaaa (0,4)(0,4)(4,4)
28 E (abcd|abc)(d?) abcd (0,4)(0,4)(4,4)
29 E (abc|abcd)(d?) abcd (0,4)(0,4)(4,4)
30 E (abc|abcd)(d?)e abcde (0,5)(0,4)(4,4)
31 E (abcd|abc)(d?)e abcde (0,5)(0,4)(4,4)
32 E a(bc|bcd)(d?) abcd (0,4)(1,4)(4,4)
33 E a(bcd|bc)(d?) abcd (0,4)(1,4)(4,4)
34 E a*(a?bc|bcd)(d?) aaabcd (0,6)(3,6)(6,6)
35 E a*(bcd|a?bc)(d?) aaabcd (0,6)(3,6)(6,6)
36 E (a|(a*b*))* NULL (0,0)(0,0)(0,0)
37 E SAME a (0,1)(0,1)(?,?)
38 E SAME aa (0,2)(0,2)(0,2)
39 E SAME aaa (0,3)(0,3)(0,3)
40 E SAME bbb (0,3)(0,3)(0,3)
41 E SAME aaabbb (0,6)(0,6)(0,6)
42 E SAME bbbaaa (0,6)(3,6)(3,6)
43 E ((a*b*)|a)* NULL (0,0)(0,0)(0,0)
44 E SAME a (0,1)(0,1)(0,1)
45 E SAME aa (0,2)(0,2)(0,2)
46 E SAME aaa (0,3)(0,3)(0,3)
47 E SAME bbb (0,3)(0,3)(0,3)
48 E SAME aaabbb (0,6)(0,6)(0,6)
49 E SAME bbbaaa (0,6)(3,6)(3,6)
50 E a.*(.*b.*(.*c.*).*d.*).*e.*(.*f.*).*g aabbccddeeffgg (0,14)(3,9)(5,7)(11,13)
51 E (wee|week)(night|knights)s* weeknights (0,10)(0,4)(4,9)
52 E SAME weeknightss (0,11)(0,4)(4,9)
53 E a* aaaaaaaaaa (0,10)
54 E aa* aaaaaaaaaa (0,10)
55 E aaa* aaaaaaaaaa (0,10)
56 E aaaa* aaaaaaaaaa (0,10)
57 # Test clearing old submatch data with nesting parentheses and iteration
58 E ((a)|(b))*c aaabc (0,5)(3,4)(?,?)(3,4)
59 E SAME aaaac (0,5)(3,4)(3,4)(?,?)
60 E foo((bar)*)*zot foozot (0,6)(3,3)(?,?)
61 E SAME foobarzot (0,9)(3,6)(3,6)
62 E SAME foobarbarzot (0,12)(3,9)(6,9)
63 E foo((zup)*|(bar)*|(zap)*)*zot foobarzapzot (0,12)(6,9)(?,?)(?,?)(6,9)
64 E SAME foobarbarzapzot (0,15)(9,12)(?,?)(?,?)(9,12)
65 E SAME foozupzot (0,9)(3,6)(3,6)(?,?)(?,?)
66 E SAME foobarzot (0,9)(3,6)(?,?)(3,6)(?,?)
67 E SAME foozapzot (0,9)(3,6)(?,?)(?,?)(3,6)
68 E SAME foozot (0,6)(3,3)(?,?)(?,?)(?,?)
69 # Test case where, e.g., Perl and Python regexp functions, and many
70 # other backtracking matchers, fail to produce the longest match.
71 # It is not exactly a bug since Perl does not claim to find the
72 # longest match, but a confusing feature and, in my opinion, a bad
73 # design choice because the union operator is traditionally defined
74 # to be commutative (with respect to the language denoted by the RE). */
75 E (a|ab)(blip)? ablip (0,5)(0,1)(1,5)
76 E SAME ab (0,2)(0,2)(?,?)
77 E (ab|a)(blip)? ablip (0,5)(0,1)(1,5)
78 E SAME ab (0,2)(0,2)(?,?)
79 E ((a|b)*)a(a|b)* aaaaabaaaba (0,11)(0,10)(9,10)(?,?)
80 E SAME aaaaabaaab (0,10)(0,8)(7,8)(9,10)
81 E SAME caa (1,3)(1,2)(1,2)(?,?)
82 E ((a|aba)*)(ababbaba)((a|b)*) aabaababbabaaababbab (0,20)(0,4)(1,4)(4,12)(12,20)(19,20)
83 E SAME aaaaababbaba (0,12)(0,4)(3,4)(4,12)(12,12)(?,?)
84 E ((a|aba|abb|bba|bab)*)(ababbababbabbbabbbbbbabbaba)((a|b)*) aabaabbbbabababaababbababbabbbabbbbbbabbabababbababababbabababa (0,63)(0,16)(13,16)(16,43)(43,63)(62,63)
85 # Test for empty subexpressions
88 #E SAME NULL (0,0)(0,0)
91 #E SAME NULL (0,0)(0,0)
99 E (a*)b(c*) abc (0,3)(0,1)(2,3)
100 E SAME ***abc*** (3,6)(3,4)(5,6)
102 E ((a)) a (0,1)(0,1)(0,1)
103 E ((((((((((((((((((((a)))))))))))))))))))) a (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)
104 E ksntoeaiksntoeaikstneoaiksnteoaiksntoeaiskntoeaiskntoekainstoeiaskntoeakisntoeksaitnokesantiksoentaikosentaiksoentaiksnoeaisknteoaksintoekasitnoeksaitkosetniaksoetnaisknoetakistoeksintokesanitksoentaisknoetaisknoetiaksotneaikstoekasitoeskatioksentaiksoenatiksoetnaiksonateiksoteaeskanotisknetaiskntoeasknitoskenatiskonetaisknoteai x NOMATCH
105 E ((aab)|(aac)|(aa*))c aabc (0,4)(0,3)(0,3)(?,?)(?,?)
106 E SAME aacc (0,4)(0,3)(?,?)(0,3)(?,?)
107 E SAME aaac (0,4)(0,3)(?,?)(?,?)(0,3)
108 E ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$ foo!bar!bas (0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
109 E ^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$ foo!bar!bas (0,11)(?,?)(?,?)(4,8)(8,11)
110 E ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$ foo!bar!bas (0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
111 E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Quathafi (0,16)(?,?)(11,13)
112 Ei (Ab|cD)* aBcD (0,4)(2,4)
119 E a{1,2}* NULL BADRPT
120 E a{1,2}+ NULL BADRPT
121 # Many of the following tests were mostly inspired by (or copied from) the
122 # libhackerlab posix test suite by Tom Lord
144 # Test bracket expressions
184 E [()+?*\]+ x\*?+()x (1,7)
185 # Standard character classes
186 E [[:alnum:]]+ %abc123890XYZ= (1,13)
187 E$ [[:cntrl:]]+ %\n\t\015\f (1,5)
188 E [[:lower:]]+ AbcdE (1,4)
189 Ei [[:lower:]]+ AbcdE (0,5)
190 E$ [[:space:]]+ x \t\f\nx (1,5)
191 E [[:alpha:]]+ %abC123890xyz= (1,4)
192 E [[:digit:]]+ %abC123890xyz= (4,10)
193 E [^[:digit:]]+ %abC123890xyz= (0,4)
194 E$ [[:print:]]+ \n %abC12\f (1,8)
195 E$ [[:upper:]]+ \n aBCDEFGHIJKLMNOPQRSTUVWXYz (3,27)
196 Ei$ [[:upper:]]+ \n aBCDEFGHIJKLMNOPQRSTUVWXYz (2,28)
197 E$ [[:blank:]]+ \na \t b (2,5)
198 E$ [[:graph:]]+ \n %abC12\f (2,8)
199 E [[:punct:]]+ a~!@#$%^&*()_+=-`[]{};':"|\,./?>< (1,33)
200 E [[:xdigit:]]+ -0123456789ABCDEFabcdef (1,23)
201 E [[:bogus-character-class-name:] NULL ECTYPE
202 # Range expressions (assuming that the C locale is being used)
203 E [a-z]+ ABCabcxyzABC (3,9)
205 B [a-b-c] NULL ERANGE
206 E [a-a]+ zaaaaab (1,6)
207 E [--Z]+ !ABC-./XYZ~ (1,10)
210 E [*--Z]+ !+*,---ABC (1,7)
211 E [a-]+ xa-a--a-ay (1,9)
212 # REG_ICASE and character sets
213 Ei [a-c]* cABbage (0,5)
214 Ei [^a-c]* tObAcCo (0,2)
215 Ei [A-C]* cABbage (0,5)
216 Ei [^A-C]* tObAcCo (0,2)
217 # Complex character sets
218 E [[:digit:]a-z#$%]+ __abc#lmn012$x%yz789* (2,20)
219 Ei [[:digit:]a-z#$%]+ __abcLMN012x%#$yz789* (2,20)
220 E [^[:digit:]a-z#$%]+ abc#lmn012$x%yz789--@*,abc (18,23)
221 Ei [^[:digit:]a-z#$%]+ abc#lmn012$x%yz789--@*,abc (18,23)
222 Ei [^[:digit:]#$%[:xdigit:]]+ abc#lmn012$x%yz789--@*,abc (4,7)
223 E [^-]+ ---afd*(&,ml--- (3,12)
224 E [^--Z]+ ---AFD*(&,ml--- (6,12)
225 Ei [^--Z]+ ---AFD*(&,ml--- (6,10)
226 # Miscellaneous tests
227 B abc\(\(de\)\(fg\)\)hi xabcdefghiy (1,10)(4,8)(4,6)(6,8)
228 B abc*def xabdefy (1,6)
229 B SAME xabcdefy (1,7)
230 B SAME xabcccccccdefy (1,13)
231 B abc\(def\)*ghi xabcghiy (1,7)(?,?)
232 B SAME xabcdefghi (1,10)(4,7)
233 B SAME xabcdefdefdefghi (1,16)(10,13)
238 # Test anchors and their behaviour with the REG_NEWLINE compilation
239 # flag and the REG_NOTBOL, REG_NOTEOL execution flags.
241 # Normally, `^' matches the empty string at beginning of input.
242 # If REG_NOTBOL is used, `^' won't match the zero length string.
244 Bb SAME abcdef NOMATCH
245 B SAME xyzabcdef NOMATCH
246 Bb SAME xyzabcdef NOMATCH
247 B$ SAME \nabcdef NOMATCH
248 Bb$ SAME \nabcdef NOMATCH
249 # Normally, `$' matches the empty string at end of input.
250 # If REG_NOTEOL is used, `$' won't match the zero length string.
252 Be SAME defabc NOMATCH
253 B SAME defabcxyz NOMATCH
254 Be SAME defabcxyz NOMATCH
255 B$ SAME defabc\n NOMATCH
256 Be$ SAME defabc\n NOMATCH
261 B$ SAME \nabc\n NOMATCH
262 B$ SAME defabc\n NOMATCH
263 B$ SAME \nabcdef NOMATCH
264 B SAME abcdef NOMATCH
265 B SAME defabc NOMATCH
266 B$ SAME abc\ndef NOMATCH
267 B$ SAME def\nabc NOMATCH
268 # If REG_NEWLINE is used, `^' matches the empty string immediately after
269 # a newline, regardless of whether execution flags contain REG_NOTBOL.
270 # Similarly, if REG_NEWLINE is used, `$' matches the empty string
271 # immediately before a newline, regardless of execution flags.
273 Bbn SAME abcdef NOMATCH
274 Bn SAME xyzabcdef NOMATCH
275 Bbn SAME xyzabcdef NOMATCH
276 Bn$ SAME \nabcdef (1,4)
277 Bbn$ SAME \nabcdef (1,4)
279 Ben SAME defabc NOMATCH
280 Bn SAME defabcxyz NOMATCH
281 Ben SAME defabcxyz NOMATCH
282 Bn$ SAME defabc\n (3,6)
283 Ben$ SAME defabc\n (3,6)
287 Bben SAME abc NOMATCH
288 Bn$ SAME \nabc\n (1,4)
289 Bn$ SAME defabc\n NOMATCH
290 Bn$ SAME \nabcdef NOMATCH
291 Bn SAME abcdef NOMATCH
292 Bbn SAME abcdef NOMATCH
293 Bn SAME defabc NOMATCH
294 Ben SAME defabc NOMATCH
295 Bn$ SAME abc\ndef (0,3)
296 Bbn$ SAME abc\ndef NOMATCH
297 Ben$ SAME abc\ndef (0,3)
298 Bbn$ SAME abc\ndef NOMATCH
299 Bn$ SAME def\nabc (4,7)
300 Bbn$ SAME def\nabc (4,7)
301 Ben$ SAME def\nabc NOMATCH
302 Bben$ SAME def\nabc NOMATCH
303 # With BRE syntax, `^' has a special meaning only at the beginning of the
304 # RE or the beginning of a parenthesized subexpression.
305 B a\{0,1\}^bc bc NOMATCH
309 B a\{0,1\}\(^bc\) bc (0,2)(0,2)
314 # With BRE syntax, `$' has a special meaning only at the end of the
315 # RE or the end of a parenthesized subexpression.
316 B ab$c\{0,1\} ab NOMATCH
320 B \(ab$\)c\{0,1\} ab (0,2)(0,2)
325 # Miscellaneous tests for `^' and `$'
327 En$ x$\n^y foo\nybarx\nyes\n (8,11)
334 # REG_NEWLINE causes `.' not to match newlines
337 # Tests for nonstandard syntax extensions (Enhanced mode off)
339 # Zero width assertions (Enhanced mode off)
340 BE \<x aax xaa NOMATCH
342 BE x\> axx xaa NOMATCH
344 BE \bx axx xaa NOMATCH
346 BE x\b axx xaa NOMATCH
348 BE \Bx aax xxa NOMATCH
350 BE \Bx\b aax xxx NOMATCH
354 # Shorthands for character classes (Enhanced mode off)
355 B \w\{1,\} ,.(a23_Nt-öo) NOMATCH
357 E \w{1,} ,.(a23_Nt-öo) NOMATCH
359 B \d\{1,\} uR120_4=v4 NOMATCH
361 E \d{1,} uR120_4=v4 NOMATCH
363 B \D\{1,\} 120d_=vA4s NOMATCH
365 E \D{1,} 120d_=vA4s NOMATCH
367 E \w+ ,.(a23_Nt-öo) NOMATCH
369 E \d+ uR120_4=v4 NOMATCH
371 E \D+ 120d_=vA4s NOMATCH
373 # Quoted special characters (Enhanced mode off)
378 # Test the \x1B and \x{263a} extensions for specifying 8 bit and wide
379 # characters in hexadecimal. (Enhanced mode off)
382 BE$ \\x5 \005 NOMATCH
384 BE$ \\x5r \005r NOMATCH
386 # test_comp("\\x",REG_EXTENDED,0)
387 # test_nexec("\000",1,0,REG_OK,0,1)
388 # test_comp("\\xr",REG_EXTENDED,0)
389 # test_nexec("\000r",2,0,REG_OK,0,2)
390 BE \x{41} ABC NOMATCH
392 E SAME xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (0,41)
393 BE$ \\x{5} \005 NOMATCH
396 BE$ \\x{5}r \005r NOMATCH
399 # test_comp("\\x{}",REG_EXTENDED,0)
400 # test_nexec("\000",1,0,REG_OK,0,1)
401 # test_comp("\\x{}r",REG_EXTENDED,0)
402 # test_nexec("\000r",2,0,REG_OK,0,2)
403 # Tests for (?inrU-inrU) and (?inrU-inrU:) (Enhanced mode off)
404 E foo(?i)bar fooBaR BADRPT
405 E foo(?i)bar|zap fooBaR BADRPT
410 Ei foo(?-i:zap)zot FoOzapZOt BADRPT
411 Ei SAME FoOzApZOt BADRPT
412 E foo(?i:bar|zap) foozap BADRPT
416 E foo(?U:o*)(o*) foooo BADRPT
417 # Test comment syntax (Enhanced mode off)
418 E foo(?# This here is a comment. )bar foobar BADRPT
419 # Tests for \Q and \E (Enhanced mode off)
420 E \((\Q)?:\<[^$\E) ()?:\<[^$ EBRACK
421 E \Qabc\E.* abcdef NOMATCH
422 E SAME QabcEdef (0,8)
423 E \Qabc\E.*|foo parabc123wxyz NOMATCH
424 E SAME fooabc123wxyz (0,3)
425 E SAME QabcEdef (0,8)
426 # Test bounded repetitions
430 E a{1,3} xaaaaa (1,4)
452 E a{5,10} aaaaaaa (0,7)
453 E a{6,6} aaaaaaaaaaaa (0,6)
454 E SAME xxaaaaaaaaaaaa (2,8)
455 E SAME xxaaaaa NOMATCH
456 E a{5,6} aaaaaaaaaaaa (0,6)
457 E SAME xxaaaaaaaaaaaa (2,8)
459 E SAME xxaaaa NOMATCH
461 E ([ab]{5,10})*b bbbbbabaaaaab (0,13)(7,12)
462 E SAME bbbbbbaaaaab (0,12)(6,11)
463 E SAME bbbbbbaaaab (0,11)(0,10)
464 E SAME bbbbbbaaab (0,10)(0,9)
465 E SAME bbbbbbaab (0,9)(0,8)
466 E SAME bbbbbbab (0,8)(0,7)
467 E ([ab]*)(ab[ab]{5,10})ba abbabbbabaabbbbbbbbbbbbbabaaaabab (0,10)(0,0)(0,8)
468 E SAME abbabbbabaabbbbbbbbbbbbabaaaaabab (0,32)(0,23)(23,30)
469 E SAME abbabbbabaabbbbbbbbbbbbabaaaabab (0,24)(0,10)(10,22)
470 E SAME abbabbbabaabbbbbbbbbbbba (0,24)(0,10)(10,22)
471 # Test repeating something that has submatches inside
472 E (a){0,5} NULL (0,0)(?,?)
475 E SAME aaa (0,3)(2,3)
476 E SAME aaaa (0,4)(3,4)
477 E SAME aaaaa (0,5)(4,5)
478 E SAME aaaaaa (0,5)(4,5)
479 E (a){2,3} NULL NOMATCH
482 E SAME aaa (0,3)(2,3)
483 E SAME aaaa (0,3)(2,3)
484 B \(a\)\{4\} aaaa (0,4)(3,4)
485 B \(a*\)\{2\} a (0,1)(1,1)
486 E ((..)|(.)){2} aa (0,2)(1,2)(?,?)(1,2)
488 #E (.){2}{3} xxxxx NOMATCH
489 #E SAME xxxxxx (0,6)(5,6)
490 #E (..){2}{3} xxxxxxxxxxx NOMATCH
491 #E SAME xxxxxxxxxxxx (0,12)(10,12)
492 E ((..){2}.){3} xxxxxxxxxxxxxx NOMATCH
493 E SAME xxxxxxxxxxxxxxx (0,15)(10,15)(12,14)
494 E ((..){1,2}.){3} xxxxxxxx NOMATCH
495 E SAME xxxxxxxxx (0,9)(6,9)(6,8)
496 E SAME xxxxxxxxxx (0,9)(6,9)(6,8)
497 E SAME xxxxxxxxxxx (0,11)(8,11)(8,10)
498 #E a{2}{2}x NULL NOMATCH
505 #E SAME aaaaaax (2,7)
506 #E SAME aaaaaaax (3,8)
507 #E SAME aaaaaaaax (4,9)
508 # Repeats with iterations inside
509 E$ ([a-z]+){2,5} a\n NOMATCH
510 E$ SAME aa\n (0,2)(1,2)
511 # Multiple repeats in one regexp
512 E a{3}b{3} aaabbb (0,6)
517 # Test that different types of repetitions work correctly when used
518 # in the same regexp.
519 #E a{2}{2}xb+xc*xd?x aaaaxbxcxdx (0,11)
520 #E SAME aaaxbxcxdx NOMATCH
521 #E SAME aabxcxdx NOMATCH
522 #E SAME aaaacxdx NOMATCH
523 #E SAME aaaaxbdx NOMATCH
524 E ^!packet [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} [0-9]+ !packet 10.0.2.4 12765 ei voittoa (0,22)
525 # Back referencing tests
526 B \([a-z]*\) \1 foobar foobar (0,13)(0,6)
527 # Searching for a leftmost longest square (repeated string)
528 B \(.*\)\1 foobarfoobar (0,12)(0,6)
529 B a\(b\)*c\1 acb NOMATCH
530 B SAME abbcbbb (0,5)(2,3)
531 B SAME abbdbd NOMATCH
532 B \([a-c]*\)\1 abcacdef (0,0)(0,0)
533 B SAME abcabcabcd (0,6)(0,3)
534 B \(a*\)*\(x\)\(\1\) x (0,1)(0,0)(0,1)(1,1)
535 B SAME ax (0,2)(1,1)(1,2)(2,2)
536 B \(a\)\1\{1,2\} aabc (0,2)(0,1)
537 B \(\)\(\1\1\)* NULL (0,0)(0,0)(0,0)
538 # Check that back references work with REG_NOSUB
539 Bw \(o\)\1 foobar NULL
540 B \(o\)\1 foobar (1,3)(1,2)
543 B \1foo\(bar\) x ESUBREG
544 # Back reference with zero-width assertion
545 B \(.\)\1$ foox NOMATCH
546 B SAME foo (1,3)(1,2)
547 # Back references together with {}
548 B \([0-9]\{5\}\)\1 12345 NOMATCH
549 B SAME 1234512345 (0,10)(0,5)
550 B \([0-9]\{4\}\)\1 1234 NOMATCH
551 B SAME 12341234 (0,8)(0,4)
552 # Test minimal repetitions (non-greedy repetitions)
558 E .{2,5}? abcd BADRPT
560 E <b>(.*?)</b> <b>text1</b><b>text2</b> BADRPT
561 E a(.*?)(foo|bar|zap) hubba wooga-booga zabar gafoo wazap BADRPT
564 E (a|^b) bas (0,1)(0,1)
573 E (a)\1 a1 (0,2)(0,1)
574 # Lack of minimal repetition