22 ab*bc abbbbc y $& abbbbc
23 ab*bc abbbbc y $-[0] 0
24 ab*bc abbbbc y $+[0] 6
28 .{3,4} abbbbc y $& abbb
29 .{3,4} abbbbc y $-[0] 0
30 .{3,4} abbbbc y $+[0] 4
31 ab{0,}bc abbbbc y $& abbbbc
32 ab{0,}bc abbbbc y $-[0] 0
33 ab{0,}bc abbbbc y $+[0] 6
40 ab+bc abbbbc y $& abbbbc
41 ab+bc abbbbc y $-[0] 0
42 ab+bc abbbbc y $+[0] 6
43 ab{1,}bc abbbbc y $& abbbbc
44 ab{1,}bc abbbbc y $-[0] 0
45 ab{1,}bc abbbbc y $+[0] 6
46 ab{1,3}bc abbbbc y $& abbbbc
47 ab{1,3}bc abbbbc y $-[0] 0
48 ab{1,3}bc abbbbc y $+[0] 6
49 ab{3,4}bc abbbbc y $& abbbbc
50 ab{3,4}bc abbbbc y $-[0] 0
51 ab{3,4}bc abbbbc y $+[0] 6
52 ab{4,5}bc abbbbc n - -
55 ab{0,1}bc abc y $& abc
78 a[b-a] - c - Invalid [] range "b-a"
79 a[]b - ci - Unmatched [
82 a[]]b a]b yi $& a]b ICU makes [] into an empty set.
85 a[^-b]c adc yi $& adc ICU [] set rules
86 a[^-b]c a-c ni - - ICU [] set rules
88 a[^]b]c adc yi $& adc ICU [] set rules.
135 *a - c - Quantifier follows nothing
136 (*)b - c - Quantifier follows nothing
138 a\ - c - Search pattern not terminated
139 a\(b a(b y $&-$1 a(b-
143 abc) - c - Unmatched )
144 (abc - c - Unmatched (
145 ((a)) abc y $&-$1-$2 a-a-a
146 ((a)) abc y $-[0]-$-[1]-$-[2] 0-0-0
147 ((a)) abc y $+[0]-$+[1]-$+[2] 1-1-1
148 ((a)) abc by @- 0 0 0
149 ((a)) abc by @+ 1 1 1
150 (a)b(c) abc y $&-$1-$2 abc-a-c
151 (a)b(c) abc y $-[0]-$-[1]-$-[2] 0-0-2
152 (a)b(c) abc y $+[0]-$+[1]-$+[2] 3-1-3
153 a+b+c aabbabc y $& abc
154 a{1,}b{1,}c aabbabc y $& abc
155 a** - c - Nested quantifiers
156 a.+?c abcabc y $& abc
157 (a+|b)* ab y $&-$1 ab-b
162 (a+|b){0,} ab y $&-$1 ab-b
163 (a+|b)+ ab y $&-$1 ab-b
164 (a+|b){1,} ab y $&-$1 ab-b
165 (a+|b)? ab y $&-$1 a-a
166 (a+|b){0,1} ab y $&-$1 a-a
171 ([abc])*d abbbcd y $&-$1 abbbcd-c
172 ([abc])*bcd abcd y $&-$1 abcd-a
174 (a|b|c|d|e)f ef y $&-$1 ef-e
175 (a|b|c|d|e)f ef y $-[0] 0
176 (a|b|c|d|e)f ef y $+[0] 2
177 (a|b|c|d|e)f ef y $-[1] 0
178 (a|b|c|d|e)f ef y $+[1] 1
179 abcd*efg abcdefg y $& abcdefg
180 ab* xabyabbbz y $& ab
182 (ab|cd)e abcde y $&-$1 cde-cd
183 [abhgefdc]ij hij y $& hij
184 ^(ab|cd)e abcde n x$1y xy
185 (abc|)ef abcdef y $&-$1 ef-
186 (a|b)c*d abcd y $&-$1 bcd-b
187 (ab|ab*)bc abc y $&-$1 abc-a
188 a([bc]*)c* abc y $&-$1 abc-bc
189 a([bc]*)(c*d) abcd y $&-$1-$2 abcd-bc-d
190 a([bc]*)(c*d) abcd y $-[0] 0
191 a([bc]*)(c*d) abcd y $+[0] 4
192 a([bc]*)(c*d) abcd y $-[1] 1
193 a([bc]*)(c*d) abcd y $+[1] 3
194 a([bc]*)(c*d) abcd y $-[2] 3
195 a([bc]*)(c*d) abcd y $+[2] 4
196 a([bc]+)(c*d) abcd y $&-$1-$2 abcd-bc-d
197 a([bc]*)(c+d) abcd y $&-$1-$2 abcd-b-cd
198 a([bc]*)(c+d) abcd y $-[0] 0
199 a([bc]*)(c+d) abcd y $+[0] 4
200 a([bc]*)(c+d) abcd y $-[1] 1
201 a([bc]*)(c+d) abcd y $+[1] 2
202 a([bc]*)(c+d) abcd y $-[2] 2
203 a([bc]*)(c+d) abcd y $+[2] 4
204 a[bcd]*dcdcde adcdcde y $& adcdcde
205 a[bcd]+dcdcde adcdcde n - -
206 (ab|a)b*c abc y $&-$1 abc-ab
207 (ab|a)b*c abc y $-[0] 0
208 (ab|a)b*c abc y $+[0] 3
209 (ab|a)b*c abc y $-[1] 0
210 (ab|a)b*c abc y $+[1] 2
211 ((a)(b)c)(d) abcd y $1-$2-$3-$4 abc-a-b-d
212 ((a)(b)c)(d) abcd y $-[0] 0
213 ((a)(b)c)(d) abcd y $+[0] 4
214 ((a)(b)c)(d) abcd y $-[1] 0
215 ((a)(b)c)(d) abcd y $+[1] 3
216 ((a)(b)c)(d) abcd y $-[2] 0
217 ((a)(b)c)(d) abcd y $+[2] 1
218 ((a)(b)c)(d) abcd y $-[3] 1
219 ((a)(b)c)(d) abcd y $+[3] 2
220 ((a)(b)c)(d) abcd y $-[4] 3
221 ((a)(b)c)(d) abcd y $+[4] 4
222 [a-zA-Z_][a-zA-Z0-9_]* alpha y $& alpha
223 ^a(bc+|b[eh])g|.h$ abh y $&-$1 bh-
224 (bc+d$|ef*g.|h?i(j|k)) effgz y $&-$1-$2 effgz-effgz-
225 (bc+d$|ef*g.|h?i(j|k)) ij y $&-$1-$2 ij-ij-j
226 (bc+d$|ef*g.|h?i(j|k)) effg n - -
227 (bc+d$|ef*g.|h?i(j|k)) bcdd n - -
228 (bc+d$|ef*g.|h?i(j|k)) reffgz y $&-$1-$2 effgz-effgz-
229 ((((((((((a)))))))))) a y $10 a
230 ((((((((((a)))))))))) a y $-[0] 0
231 ((((((((((a)))))))))) a y $+[0] 1
232 ((((((((((a)))))))))) a y $-[10] 0
233 ((((((((((a)))))))))) a y $+[10] 1
234 ((((((((((a))))))))))\10 aa y $& aa
235 ((((((((((a))))))))))${bang} aa n - -
236 ((((((((((a))))))))))${bang} a! y $& a!
237 (((((((((a))))))))) a y $& a
238 multiple words of text uh-uh n - -
239 multiple words multiple words, yeah y $& multiple words
240 (.*)c(.*) abcde y $&-$1-$2 abcde-ab-de
241 \((.*), (.*)\) (a, b) y ($2, $1) (b, a)
243 abcd abcd y $&-\$&-\\$& abcd-$&-\abcd
244 a(bc)d abcd y $1-\$1-\\$1 bc-$1-\bc
246 (abc)\1 abcabc y $1 abc
247 ([a-c]*)\1 abcabc y $1 abc
248 \1 - c - Reference to nonexistent group
249 \2 - c - Reference to nonexistent group
252 (a)|\2 - c - Reference to nonexistent group
253 (([a-c])b*?\2)* ababbbcbc y $&-$1-$2 ababb-bb-b
254 (([a-c])b*?\2){3} ababbbcbc y $&-$1-$2 ababbbcbc-cbc-c
255 ((\3|b)\2(a)x)+ aaxabxbaxbbx n - -
256 ((\3|b)\2(a)x)+ aaaxabaxbaaxbbax y $&-$1-$2-$3 bbax-bbax-b-a
257 ((\3|b)\2(a)){2,} bbaababbabaaaaabbaaaabba y $&-$1-$2-$3 bbaaaabba-bba-b-a
268 'abc'i XABCY y $& ABC
269 'abc'i ABABC y $& ABC
271 'ab*bc'i ABC y $& ABC
272 'ab*bc'i ABBC y $& ABBC
273 'ab*?bc'i ABBBBC y $& ABBBBC
274 'ab{0,}?bc'i ABBBBC y $& ABBBBC
275 'ab+?bc'i ABBC y $& ABBC
278 'ab{1,}bc'i ABQ n - -
279 'ab+bc'i ABBBBC y $& ABBBBC
280 'ab{1,}?bc'i ABBBBC y $& ABBBBC
281 'ab{1,3}?bc'i ABBBBC y $& ABBBBC
282 'ab{3,4}?bc'i ABBBBC y $& ABBBBC
283 'ab{4,5}?bc'i ABBBBC n - -
284 'ab??bc'i ABBC y $& ABBC
285 'ab??bc'i ABC y $& ABC
286 'ab{0,1}?bc'i ABC y $& ABC
287 'ab??bc'i ABBBBC n - -
288 'ab??c'i ABC y $& ABC
289 'ab{0,1}?c'i ABC y $& ABC
290 '^abc$'i ABC y $& ABC
292 '^abc'i ABCC y $& ABC
294 'abc$'i AABC y $& ABC
299 'a.*?c'i AXYZC y $& AXYZC
302 'a[bc]d'i ABD y $& ABD
304 'a[b-d]e'i ACE y $& ACE
305 'a[b-d]'i AAC y $& AC
308 'a[b-a]'i - c - Invalid [] range "b-a"
309 'a[]b'i - ci - Unmatched [
310 'a['i - c - Unmatched [
312 'a[]]b'i A]B yi $& A]B
313 'a[^bc]d'i AED y $& AED
315 'a[^-b]c'i ADC yi $& ADC ICU [] set rules
316 'a[^-b]c'i A-C ni - - ICU [] set rules
318 'a[^]b]c'i ADC yi $& ADC
320 'ab|cd'i ABCD y $& AB
321 '()ef'i DEF y $&-$1 EF-
322 '*a'i - c - Quantifier follows nothing
323 '(*)b'i - c - Quantifier follows nothing
325 'a\'i - c - Search pattern not terminated
326 'a\(b'i A(B y $&-$1 A(B-
328 'a\(*b'i A((B y $& A((B
330 'abc)'i - c - Unmatched )
331 '(abc'i - c - Unmatched (
332 '((a))'i ABC y $&-$1-$2 A-A-A
333 '(a)b(c)'i ABC y $&-$1-$2 ABC-A-C
334 'a+b+c'i AABBABC y $& ABC
335 'a{1,}b{1,}c'i AABBABC y $& ABC
336 'a**'i - c - Nested quantifiers
337 'a.+?c'i ABCABC y $& ABC
338 'a.*?c'i ABCABC y $& ABC
339 'a.{0,5}?c'i ABCABC y $& ABC
340 '(a+|b)*'i AB y $&-$1 AB-B
341 '(a+|b){0,}'i AB y $&-$1 AB-B
342 '(a+|b)+'i AB y $&-$1 AB-B
343 '(a+|b){1,}'i AB y $&-$1 AB-B
344 '(a+|b)?'i AB y $&-$1 A-A
345 '(a+|b){0,1}'i AB y $&-$1 A-A
346 '(a+|b){0,1}?'i AB y $&-$1 -
347 ')('i - c - Unmatched )
348 '[^ab]*'i CDE y $& CDE
351 '([abc])*d'i ABBBCD y $&-$1 ABBBCD-C
352 '([abc])*bcd'i ABCD y $&-$1 ABCD-A
353 'a|b|c|d|e'i E y $& E
354 '(a|b|c|d|e)f'i EF y $&-$1 EF-E
355 'abcd*efg'i ABCDEFG y $& ABCDEFG
356 'ab*'i XABYABBBZ y $& AB
357 'ab*'i XAYABBBZ y $& A
358 '(ab|cd)e'i ABCDE y $&-$1 CDE-CD
359 '[abhgefdc]ij'i HIJ y $& HIJ
360 '^(ab|cd)e'i ABCDE ni x$1y XY
361 '(abc|)ef'i ABCDEF y $&-$1 EF-
362 '(a|b)c*d'i ABCD y $&-$1 BCD-B
363 '(ab|ab*)bc'i ABC y $&-$1 ABC-A
364 'a([bc]*)c*'i ABC y $&-$1 ABC-BC
365 'a([bc]*)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
366 'a([bc]+)(c*d)'i ABCD y $&-$1-$2 ABCD-BC-D
367 'a([bc]*)(c+d)'i ABCD y $&-$1-$2 ABCD-B-CD
368 'a[bcd]*dcdcde'i ADCDCDE y $& ADCDCDE
369 'a[bcd]+dcdcde'i ADCDCDE n - -
370 '(ab|a)b*c'i ABC y $&-$1 ABC-AB
371 '((a)(b)c)(d)'i ABCD y $1-$2-$3-$4 ABC-A-B-D
372 '[a-zA-Z_][a-zA-Z0-9_]*'i ALPHA y $& ALPHA
373 '^a(bc+|b[eh])g|.h$'i ABH y $&-$1 BH-
374 '(bc+d$|ef*g.|h?i(j|k))'i EFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
375 '(bc+d$|ef*g.|h?i(j|k))'i IJ y $&-$1-$2 IJ-IJ-J
376 '(bc+d$|ef*g.|h?i(j|k))'i EFFG n - -
377 '(bc+d$|ef*g.|h?i(j|k))'i BCDD n - -
378 '(bc+d$|ef*g.|h?i(j|k))'i REFFGZ y $&-$1-$2 EFFGZ-EFFGZ-
379 '((((((((((a))))))))))'i A y $10 A
380 '((((((((((a))))))))))\10'i AA y $& AA
381 '((((((((((a))))))))))${bang}'i AA n - -
382 '((((((((((a))))))))))${bang}'i A! y $& A!
383 '(((((((((a)))))))))'i A y $& A
384 '(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))'i A y $1 A
385 '(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))'i C y $1 C
386 'multiple words of text'i UH-UH n - -
387 'multiple words'i MULTIPLE WORDS, YEAH y $& MULTIPLE WORDS
388 '(.*)c(.*)'i ABCDE y $&-$1-$2 ABCDE-AB-DE
389 '\((.*), (.*)\)'i (A, B) y ($2, $1) (B, A)
391 'abcd'i ABCD y $&-\$&-\\$& ABCD-$&-\ABCD
392 'a(bc)d'i ABCD y $1-\$1-\\$1 BC-$1-\BC
394 '(abc)\1'i ABCABC y $1 ABC
395 '([a-c]*)\1'i ABCABC y $1 ABC
398 a(?=c|d). abad y $& ad
399 a(?:b|c|d)(.) ace y $1 e
400 a(?:b|c|d)*(.) ace y $1 e
401 a(?:b|c|d)+?(.) ace y $1 e
402 a(?:b|c|d)+?(.) acdbcdbe y $1 d
403 a(?:b|c|d)+(.) acdbcdbe y $1 e
404 a(?:b|c|d){2}(.) acdbcdbe y $1 b
405 a(?:b|c|d){4,5}(.) acdbcdbe y $1 b
406 a(?:b|c|d){4,5}?(.) acdbcdbe y $1 d
407 ((foo)|(bar))* foobar y $1-$2-$3 bar-foo-bar
408 :(?: - c - Sequence (? incomplete
409 a(?:b|c|d){6,7}(.) acdbcdbe y $1 e
410 a(?:b|c|d){6,7}?(.) acdbcdbe y $1 e
411 a(?:b|c|d){5,6}(.) acdbcdbe y $1 e
412 a(?:b|c|d){5,6}?(.) acdbcdbe y $1 b
413 a(?:b|c|d){5,7}(.) acdbcdbe y $1 e
414 a(?:b|c|d){5,7}?(.) acdbcdbe y $1 b
415 a(?:b|(c|e){1,2}?|d)+?(.) ace y $1$2 ce
417 ^([^a-z])|(\^)$ . y $1 .
419 ^(a\1?){4}$ aaaaaaaaaa y $1 aaaa
420 ^(a\1?){4}$ aaaaaaaaa n - -
421 ^(a\1?){4}$ aaaaaaaaaaa n - -
422 ^(a(?(1)\1)){4}$ aaaaaaaaaa y $1 aaaa
423 ^(a(?(1)\1)){4}$ aaaaaaaaa n - -
424 ^(a(?(1)\1)){4}$ aaaaaaaaaaa n - -
425 ((a{4})+) aaaaaaaaa y $1 aaaaaaaa
426 (((aa){2})+) aaaaaaaaaa y $1 aaaaaaaa
427 (((a{2}){2})+) aaaaaaaaaa y $1 aaaaaaaa
428 (?:(f)(o)(o)|(b)(a)(r))* foobar y $1:$2:$3:$4:$5:$6 f:o:o:b:a:r
436 (?<%)b - c - Sequence (?<%...) not recognized
437 (?:..)*a aba y $& aba
439 ^(?:b|a(?=(.)))*\1 abc y $& ab
442 ^((a|b)+)*ax aax y $1 a
443 ^((a|bc)+)*ax aax y $1 a
446 (?:(?i)a)b ab y $& ab
447 ((?i)a)b ab y $&:$1 ab:a
448 (?:(?i)a)b Ab y $& Ab
449 ((?i)a)b Ab y $&:$1 Ab:A
453 ((?i:a))b ab y $&:$1 ab:a
455 ((?i:a))b Ab y $&:$1 Ab:A
458 '(?:(?-i)a)b'i ab y $& ab
459 '((?-i)a)b'i ab y $&:$1 ab:a
460 '(?:(?-i)a)b'i aB y $& aB
461 '((?-i)a)b'i aB y $&:$1 aB:a
462 '(?:(?-i)a)b'i Ab n - -
463 '((?-i)a)b'i Ab n - -
464 '(?:(?-i)a)b'i aB y $& aB
465 '((?-i)a)b'i aB y $1 a
466 '(?:(?-i)a)b'i AB n - -
467 '((?-i)a)b'i AB n - -
468 '(?-i:a)b'i ab y $& ab
469 '((?-i:a))b'i ab y $&:$1 ab:a
470 '(?-i:a)b'i aB y $& aB
471 '((?-i:a))b'i aB y $&:$1 aB:a
473 '((?-i:a))b'i Ab n - -
474 '(?-i:a)b'i aB y $& aB
475 '((?-i:a))b'i aB y $1 a
477 '((?-i:a))b'i AB n - -
478 '((?-i:a.))b'i a\nB n - -
479 '((?s-i:a.))b'i a\nB y $1 a\n
480 '((?s-i:a.))b'i B\nB n - -
481 (?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b))) cabbbb y $& cabbbb
482 (?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb))) caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb y $& caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
483 '(ab)\d\1'i Ab4ab y $1 Ab
484 '(ab)\d\1'i ab4Ab y $1 ab
485 foo\w*\d{4}baz foobar1234baz y $& foobar1234baz
487 a(?{)b - c - Sequence (?{...}) not terminated or not {}-balanced
488 a(?{{})b - c - Sequence (?{...}) not terminated or not {}-balanced
490 a(?{"{"})b - c - Sequence (?{...}) not terminated or not {}-balanced
491 a(?{"\{"})b cabd y $& ab
492 a(?{"{"}})b - c - Unmatched right curly bracket
493 a(?{$bl="\{"}).b caxbd y $bl {
494 x(~~)*(?:(?:F)?)? x~~ y - -
495 ^a(?#xxx){3}c aaac y $& aaac
496 '^a (?#xxx) (?#yyy) {3}c'x aaac y $& aaac
497 (?<![cd])b dbcb n - -
498 (?<![cd])[ab] dbaacb y $& a
499 (?<!(c|d))b dbcb n - -
500 (?<!(c|d))[ab] dbaacb y $& a
501 (?<!cd)[ab] cdaccb y $& b
502 ^(?:a?b?)*$ a-- n - -
503 ((?s)^a(.))((?m)^b$) a\nb\nc\n y $1;$2;$3 a\n;\n;b
504 ((?m)^b$) a\nb\nc\n y $1 b
506 (?m)^(b) a\nb\n y $1 b
507 ((?m)^b) a\nb\n y $1 b
508 \n((?m)^b) a\nb\n y $1 b
509 ((?s).)c(?!.) a\nb\nc\n y $1 \n
510 ((?s).)c(?!.) a\nb\nc\n y $1:$& \n:\nc
511 ((?s)b.)c(?!.) a\nb\nc\n y $1 b\n
512 ((?s)b.)c(?!.) a\nb\nc\n y $1:$& b\n:b\nc
515 ((?m)^b) a\nb\nc\n y $1 b
518 (x)?(?(1)a|b) a n - -
519 (x)?(?(1)b|a) a y $& a
520 ()?(?(1)b|a) a y $& a
522 ()?(?(1)a|b) a y $& a
523 ^(\()?blah(?(1)(\)))$ (blah) y $2 )
524 ^(\()?blah(?(1)(\)))$ blah y ($2) ()
525 ^(\()?blah(?(1)(\)))$ blah) n - -
526 ^(\()?blah(?(1)(\)))$ (blah n - -
527 ^(\(+)?blah(?(1)(\)))$ (blah) y $2 )
528 ^(\(+)?blah(?(1)(\)))$ blah y ($2) ()
529 ^(\(+)?blah(?(1)(\)))$ blah) n - -
530 ^(\(+)?blah(?(1)(\)))$ (blah n - -
531 (?(1?)a|b) a c - Switch condition not recognized
532 (?(1)a|b|c) a c - Switch (?(condition)... contains too many branches
534 (?(?{0})b|a) a y $& a
536 (?(?{1})a|b) a y $& a
541 (?=(a+?))(\1ab) aaab y $2 aab
542 ^(?=(a+?))\1ab aaab n - -
543 (\w+:)+ one: y $1 one:
545 (?=(a+?))(\1ab) aaab y $2 aab
546 ^(?=(a+?))\1ab aaab n - -
547 ([\w:]+::)?(\w+)$ abcd: n - -
548 ([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
549 ([\w:]+::)?(\w+)$ xy:z:::abcd iy $1-$2 xy:z:::-abcd
550 ^[^bcd]*(c+) aexycd y $1 c
552 ([\w:]+::)?(\w+)$ abcd: n - -
553 ([\w:]+::)?(\w+)$ abcd y $1-$2 -abcd
554 ([\w:]+::)?(\w+)$ xy:z:::abcd iy $1-$2 xy:z:::-abcd
555 ^[^bcd]*(c+) aexycd y $1 c
556 (?{$a=2})a*aa(?{local$a=$a+1})k*c(?{$b=$a}) yaaxxaaaacd y $b 3
557 (?{$a=2})(a(?{local$a=$a+1}))*aak*c(?{$b=$a}) yaaxxaaaacd y $b 4
560 ([[:]+) a:[b]: iy $1 :[
561 ([[=]+) a=[b]= iy $1 =[
562 ([[.]+) a.[b]. iy $1 .[
563 [a[:xyz: - c - Unmatched [
564 [a[:xyz:] - c - POSIX class [:xyz:] unknown
565 [a[:]b[:c] abc iy $& abc
566 ([a[:xyz:]b]+) pbaq c - POSIX class [:xyz:] unknown
567 [a[:]b[:c] abc iy $& abc
568 ([[:alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd
569 ([[:alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy
570 ([[:ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__-- ${nulnul}
571 ([[:cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ${nulnul}
572 ([[:digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 01
573 ([[:graph:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
574 ([[:lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd
575 ([[:print:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
576 ([[:punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 __--
577 ([[:space:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1
578 ([[:word:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__
579 ([[:upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
580 ([[:xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01
581 ([[:^alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01
582 ([[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 __-- ${nulnul}${ffff}
583 ([[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff}
584 ([[:^cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
585 ([[:^digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd
586 ([[:^lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB
587 ([[:^print:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ${nulnul}${ffff}
588 ([[:^punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy
589 ([[:^space:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 ABcd01Xy__--
590 ([[:^word:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 -- ${nulnul}${ffff}
591 ([[:^upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd01
592 ([[:^xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} yi $1 Xy__-- ${nulnul}${ffff}
593 [[:foo:]] - c - POSIX class [:foo:] unknown
594 [[:^foo:]] - c - POSIX class [:^foo:] unknown
595 ((?>a+)b) aaab y $1 aaab
596 (?>(a+))b aaab y $1 aaa
597 ((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x
598 (?<=x+)y - c - Variable length lookbehind not implemented
599 a{37,17} - c - Can't do {n,m} with n > m
609 '\Z'm a\nb\n y $-[0] 3
610 '\z'm a\nb\n y $-[0] 4
611 '$'m a\nb\n y $-[0] 1
612 '\Z'm b\na\n y $-[0] 3
613 '\z'm b\na\n y $-[0] 4
614 '$'m b\na\n y $-[0] 1
629 'a$'m a\nb\n y $-[0] 0
630 'a\Z'm b\na\n y $-[0] 2
632 'a$'m b\na\n y $-[0] 2
633 'a\Z'm b\na y $-[0] 2
634 'a\z'm b\na y $-[0] 2
639 aa\Z b\naa\n y $-[0] 2
641 aa$ b\naa\n y $-[0] 2
645 'aa\Z'm aa\nb\n n - -
646 'aa\z'm aa\nb\n n - -
647 'aa$'m aa\nb\n y $-[0] 0
648 'aa\Z'm b\naa\n y $-[0] 2
649 'aa\z'm b\naa\n n - -
650 'aa$'m b\naa\n y $-[0] 2
651 'aa\Z'm b\naa y $-[0] 2
652 'aa\z'm b\naa y $-[0] 2
653 'aa$'m b\naa y $-[0] 2
663 'aa\Z'm ac\nb\n n - -
664 'aa\z'm ac\nb\n n - -
666 'aa\Z'm b\nac\n n - -
667 'aa\z'm b\nac\n n - -
681 'aa\Z'm ca\nb\n n - -
682 'aa\z'm ca\nb\n n - -
684 'aa\Z'm b\nca\n n - -
685 'aa\z'm b\nca\n n - -
693 ab\Z b\nab\n y $-[0] 2
695 ab$ b\nab\n y $-[0] 2
699 'ab\Z'm ab\nb\n n - -
700 'ab\z'm ab\nb\n n - -
701 'ab$'m ab\nb\n y $-[0] 0
702 'ab\Z'm b\nab\n y $-[0] 2
703 'ab\z'm b\nab\n n - -
704 'ab$'m b\nab\n y $-[0] 2
705 'ab\Z'm b\nab y $-[0] 2
706 'ab\z'm b\nab y $-[0] 2
707 'ab$'m b\nab y $-[0] 2
717 'ab\Z'm ac\nb\n n - -
718 'ab\z'm ac\nb\n n - -
720 'ab\Z'm b\nac\n n - -
721 'ab\z'm b\nac\n n - -
735 'ab\Z'm ca\nb\n n - -
736 'ab\z'm ca\nb\n n - -
738 'ab\Z'm b\nca\n n - -
739 'ab\z'm b\nca\n n - -
747 abb\Z b\nabb\n y $-[0] 2
749 abb$ b\nabb\n y $-[0] 2
750 abb\Z b\nabb y $-[0] 2
751 abb\z b\nabb y $-[0] 2
752 abb$ b\nabb y $-[0] 2
753 'abb\Z'm abb\nb\n n - -
754 'abb\z'm abb\nb\n n - -
755 'abb$'m abb\nb\n y $-[0] 0
756 'abb\Z'm b\nabb\n y $-[0] 2
757 'abb\z'm b\nabb\n n - -
758 'abb$'m b\nabb\n y $-[0] 2
759 'abb\Z'm b\nabb y $-[0] 2
760 'abb\z'm b\nabb y $-[0] 2
761 'abb$'m b\nabb y $-[0] 2
771 'abb\Z'm ac\nb\n n - -
772 'abb\z'm ac\nb\n n - -
773 'abb$'m ac\nb\n n - -
774 'abb\Z'm b\nac\n n - -
775 'abb\z'm b\nac\n n - -
776 'abb$'m b\nac\n n - -
789 'abb\Z'm ca\nb\n n - -
790 'abb\z'm ca\nb\n n - -
791 'abb$'m ca\nb\n n - -
792 'abb\Z'm b\nca\n n - -
793 'abb\z'm b\nca\n n - -
794 'abb$'m b\nca\n n - -
799 a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz x n - -
800 a(?{$a=2;$b=3;($b)=$a})b yabz y $b 2
801 round\(((?>[^()]+))\) _I(round(xs * sz),1) y $1 xs * sz
802 '((?x:.) )' x y $1- x -
803 '((?-x:.) )'x x y $1- x-
804 foo.bart foo.bart y - -
805 '^d[x][x][x]'m abcd\ndxxx y - -
806 .X(.+)+X bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - - # TODO: ICU doesn't optimize on trailing literals in pattern.
807 .X(.+)+XX bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
808 .XX(.+)+X bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
809 .X(.+)+X bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
810 .X(.+)+XX bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
811 .XX(.+)+X bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
812 .X(.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
813 .X(.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
814 .XX(.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
815 .X(.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
816 .X(.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
817 .XX(.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
818 .[X](.+)+[X] bbbbXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
819 .[X](.+)+[X][X] bbbbXcXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
820 .[X][X](.+)+[X] bbbbXXcXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa yi - -
821 .[X](.+)+[X] bbbbXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
822 .[X](.+)+[X][X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
823 .[X][X](.+)+[X] bbbbXXXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ni - -
825 ([a-\d]+) za-9z yi $1 a-9
826 ([\d-z]+) a0-za yi $1 0-z
827 ([\d-\s]+) a0- z yi $1 0-
828 ([a-[:digit:]]+) za-9z iy $1 a-9
829 ([[:digit:]-z]+) =0-z= iy $1 0-z
830 ([[:digit:]-[:alpha:]]+) =0-z= iy $1 0-z
832 (\d+\.\d+) 3.1415926 y $1 3.1415926
833 (\ba.{0,10}br) have a web browser y $1 a web br
834 '\.c(pp|xx|c)?$'i Changes n - -
835 '\.c(pp|xx|c)?$'i IO.c y - -
836 '(\.c(pp|xx|c)?$)'i IO.c y $1 .c
838 '^\S\s+aa$'m \nx aa y - -
840 ^([ab]*?)(b)?(c)$ abac y -$2- --
841 (\w)?(abc)\1b abcab n - -
842 ^(?:.,){2}c a,b,c y - -
843 ^(.,){2}c a,b,c y $1 b,
844 ^(?:[^,]*,){2}c a,b,c y - -
845 ^([^,]*,){2}c a,b,c y $1 b,
846 ^([^,]*,){3}d aaa,b,c,d y $1 c,
847 ^([^,]*,){3,}d aaa,b,c,d y $1 c,
848 ^([^,]*,){0,3}d aaa,b,c,d y $1 c,
849 ^([^,]{1,3},){3}d aaa,b,c,d y $1 c,
850 ^([^,]{1,3},){3,}d aaa,b,c,d y $1 c,
851 ^([^,]{1,3},){0,3}d aaa,b,c,d y $1 c,
852 ^([^,]{1,},){3}d aaa,b,c,d y $1 c,
853 ^([^,]{1,},){3,}d aaa,b,c,d y $1 c,
854 ^([^,]{1,},){0,3}d aaa,b,c,d y $1 c,
855 ^([^,]{0,3},){3}d aaa,b,c,d y $1 c,
856 ^([^,]{0,3},){3,}d aaa,b,c,d y $1 c,
857 ^([^,]{0,3},){0,3}d aaa,b,c,d y $1 c,
859 '(?!\A)x'm a\nxb\n y - -
860 ^(a(b)?)+$ aba iy -$1-$2- -a--
861 '^.{9}abc.*\n'm 123\nabcabcabcabc\n y - -
863 ^(a)?(?(1)a|b)+$ a n - -
864 ^(a\1?)(a\1?)(a\2?)(a\3?)$ aaaaaa y $1,$2,$3,$4 a,aa,a,aa
865 ^(a\1?){4}$ aaaaaa y $1 aa
866 ^(0+)?(?:x(1))? x1 y - -
867 ^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))? 012cxx0190 y - -
868 ^(b+?|a){1,2}c bbbac y $1 a
869 ^(b+?|a){1,2}c bbbbac y $1 a
870 \((\w\. \w+)\) cd. (A. Tw) y -$1- -A. Tw-
871 ((?:aaaa|bbbb)cccc)? aaaacccc y - -
872 ((?:aaaa|bbbb)cccc)? bbbbcccc y - -
873 (a)?(a)+ a y $1:$2 :a -
874 (ab)?(ab)+ ab y $1:$2 :ab -
875 (abc)?(abc)+ abc y $1:$2 :abc -
878 ^(a(??{"(?!)"})|(a)(?{1}))b ab yi $2 a # [ID 20010811.006]
879 ab(?i)cd AbCd n - - # [ID 20010809.023]
881 (A|B)*(?(1)(CD)|(CD)) CD y $2-$3 -CD
882 (A|B)*(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
883 (A|B)*?(?(1)(CD)|(CD)) CD y $2-$3 -CD # [ID 20010803.016]
884 (A|B)*?(?(1)(CD)|(CD)) ABCD y $2-$3 CD-
885 '^(o)(?!.*\1)'i Oo n - -
886 (.*)\d+\1 abc12bc y $1 bc
887 (?m:(foo\s*$)) foo\n bar y $1 foo
889 (.*)(?=c) abcd y $1 ab
890 (.*)(?=c)c abcd yB $1 ab
891 (.*)(?=b|c) abcd y $1 ab
892 (.*)(?=b|c)c abcd y $1 ab
893 (.*)(?=c|b) abcd y $1 ab
894 (.*)(?=c|b)c abcd y $1 ab
895 (.*)(?=[bc]) abcd y $1 ab
896 (.*)(?=[bc])c abcd yB $1 ab
897 (.*)(?<=b) abcd y $1 ab
898 (.*)(?<=b)c abcd y $1 ab
899 (.*)(?<=b|c) abcd y $1 abc
900 (.*)(?<=b|c)c abcd y $1 ab
901 (.*)(?<=c|b) abcd y $1 abc
902 (.*)(?<=c|b)c abcd y $1 ab
903 (.*)(?<=[bc]) abcd y $1 abc
904 (.*)(?<=[bc])c abcd y $1 ab
906 (.*?)(?=c) abcd y $1 ab
907 (.*?)(?=c)c abcd yB $1 ab
908 (.*?)(?=b|c) abcd y $1 a
909 (.*?)(?=b|c)c abcd y $1 ab
910 (.*?)(?=c|b) abcd y $1 a
911 (.*?)(?=c|b)c abcd y $1 ab
912 (.*?)(?=[bc]) abcd y $1 a
913 (.*?)(?=[bc])c abcd yB $1 ab
914 (.*?)(?<=b) abcd y $1 ab
915 (.*?)(?<=b)c abcd y $1 ab
916 (.*?)(?<=b|c) abcd y $1 ab
917 (.*?)(?<=b|c)c abcd y $1 ab
918 (.*?)(?<=c|b) abcd y $1 ab
919 (.*?)(?<=c|b)c abcd y $1 ab
920 (.*?)(?<=[bc]) abcd y $1 ab
921 (.*?)(?<=[bc])c abcd y $1 ab