/[pcre]/code/trunk/testdata/testinput2
ViewVC logotype

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 882 - (hide annotations) (download)
Sun Jan 15 18:45:27 2012 UTC (2 years, 7 months ago) by ph10
File size: 59500 byte(s)
Fix nested *MARK bug (nothing shown for /(?=(*:x))((*:y)q|)/ etc.)

1 ph10 450 /-- This set of tests is not Perl-compatible. It checks on special features
2     of PCRE's API, error diagnostics, and the compiled code of some patterns.
3     It also checks the non-Perl syntax the PCRE supports (Python, .NET,
4     Oniguruma). Finally, there are some tests where PCRE and Perl differ,
5 ph10 513 either because PCRE can't be compatible, or there is a possible Perl
6 ph10 836 bug.
7    
8     NOTE: This is a non-UTF set of tests. When UTF support is needed, use
9     test 5, and if Unicode Property Support is needed, use test 7. --/
10 ph10 450
11 nigel 93 /(a)b|/I
12 nigel 41
13 nigel 93 /abc/I
14 nigel 41 abc
15     defabc
16     \Aabc
17     *** Failers
18     \Adefabc
19     ABC
20    
21 nigel 93 /^abc/I
22 nigel 41 abc
23     \Aabc
24     *** Failers
25     defabc
26     \Adefabc
27    
28 nigel 93 /a+bc/I
29 nigel 41
30 nigel 93 /a*bc/I
31 nigel 41
32 nigel 93 /a{3}bc/I
33 nigel 41
34 nigel 93 /(abc|a+z)/I
35 nigel 41
36 nigel 93 /^abc$/I
37 nigel 41 abc
38     *** Failers
39     def\nabc
40    
41 ph10 178 /ab\idef/X
42 nigel 41
43 ph10 178 /(?X)ab\idef/X
44 nigel 41
45     /x{5,4}/
46    
47     /z{65536}/
48    
49     /[abcd/
50    
51 nigel 63 /(?X)[\B]/
52 nigel 41
53 ph10 513 /(?X)[\R]/
54    
55     /(?X)[\X]/
56    
57     /[\B]/BZ
58    
59     /[\R]/BZ
60    
61     /[\X]/BZ
62    
63 nigel 41 /[z-a]/
64    
65     /^*/
66    
67     /(abc/
68    
69     /(?# abc/
70    
71     /(?z)abc/
72    
73 nigel 93 /.*b/I
74 nigel 41
75 nigel 93 /.*?b/I
76 nigel 41
77 nigel 93 /cat|dog|elephant/I
78 nigel 41 this sentence eventually mentions a cat
79     this sentences rambles on and on for a while and then reaches elephant
80    
81 nigel 93 /cat|dog|elephant/IS
82 nigel 41 this sentence eventually mentions a cat
83     this sentences rambles on and on for a while and then reaches elephant
84    
85 nigel 93 /cat|dog|elephant/IiS
86 nigel 41 this sentence eventually mentions a CAT cat
87     this sentences rambles on and on for a while to elephant ElePhant
88    
89 nigel 93 /a|[bcd]/IS
90 nigel 41
91 nigel 93 /(a|[^\dZ])/IS
92 nigel 41
93 nigel 93 /(a|b)*[\s]/IS
94 nigel 41
95     /(ab\2)/
96    
97     /{4,5}abc/
98    
99 nigel 93 /(a)(b)(c)\2/I
100 nigel 41 abcb
101     \O0abcb
102     \O3abcb
103     \O6abcb
104     \O9abcb
105 ph10 102 \O12abcb
106 nigel 41
107 nigel 93 /(a)bc|(a)(b)\2/I
108 nigel 41 abc
109     \O0abc
110     \O3abc
111     \O6abc
112     aba
113     \O0aba
114     \O3aba
115     \O6aba
116     \O9aba
117     \O12aba
118    
119 nigel 93 /abc$/IE
120 nigel 41 abc
121     *** Failers
122     abc\n
123     abc\ndef
124    
125     /(a)(b)(c)(d)(e)\6/
126    
127 nigel 93 /the quick brown fox/I
128 nigel 41 the quick brown fox
129     this is a line with the quick brown fox
130    
131 nigel 93 /the quick brown fox/IA
132 nigel 41 the quick brown fox
133     *** Failers
134     this is a line with the quick brown fox
135    
136     /ab(?z)cd/
137    
138 nigel 93 /^abc|def/I
139 nigel 41 abcdef
140     abcdef\B
141    
142 nigel 93 /.*((abc)$|(def))/I
143 nigel 41 defabc
144     \Zdefabc
145    
146     /)/
147    
148     /a[]b/
149    
150 nigel 93 /[^aeiou ]{3,}/I
151 ph10 102 co-processors, and for
152    
153 nigel 93 /<.*>/I
154 nigel 41 abc<def>ghi<klm>nop
155    
156 nigel 93 /<.*?>/I
157 nigel 41 abc<def>ghi<klm>nop
158    
159 nigel 93 /<.*>/IU
160 nigel 41 abc<def>ghi<klm>nop
161 ph10 102
162 nigel 93 /(?U)<.*>/I
163 nigel 41 abc<def>ghi<klm>nop
164    
165 nigel 93 /<.*?>/IU
166 nigel 41 abc<def>ghi<klm>nop
167 ph10 102
168 nigel 93 /={3,}/IU
169 nigel 41 abc========def
170 ph10 102
171 nigel 93 /(?U)={3,}?/I
172 nigel 41 abc========def
173 ph10 102
174 nigel 93 /(?<!bar|cattle)foo/I
175 nigel 41 foo
176 ph10 102 catfoo
177 nigel 41 *** Failers
178     the barfoo
179 ph10 102 and cattlefoo
180 nigel 41
181     /(?<=a+)b/
182    
183     /(?<=aaa|b{0,3})b/
184    
185     /(?<!(foo)a\1)bar/
186    
187 nigel 93 /(?i)abc/I
188 nigel 41
189 nigel 93 /(a|(?m)a)/I
190 nigel 41
191 nigel 93 /(?i)^1234/I
192 nigel 41
193 nigel 93 /(^b|(?i)^d)/I
194 nigel 41
195 nigel 93 /(?s).*/I
196 nigel 41
197 nigel 93 /[abcd]/IS
198 nigel 41
199 nigel 93 /(?i)[abcd]/IS
200 nigel 41
201 nigel 93 /(?m)[xy]|(b|c)/IS
202 nigel 41
203 nigel 93 /(^a|^b)/Im
204 nigel 41
205 nigel 93 /(?i)(^a|^b)/Im
206 nigel 41
207     /(a)(?(1)a|b|c)/
208    
209     /(?(?=a)a|b|c)/
210    
211     /(?(1a)/
212    
213 nigel 93 /(?(1a))/
214    
215 nigel 41 /(?(?i))/
216    
217     /(?(abc))/
218    
219     /(?(?<ab))/
220    
221 nigel 93 /((?s)blah)\s+\1/I
222 nigel 41
223 nigel 93 /((?i)blah)\s+\1/I
224 nigel 41
225 ph10 161 /((?i)b)/IDZS
226 nigel 41
227 nigel 93 /(a*b|(?i:c*(?-i)d))/IS
228 nigel 41
229 nigel 93 /a$/I
230 nigel 41 a
231     a\n
232 ph10 102 *** Failers
233 nigel 41 \Za
234 ph10 102 \Za\n
235 nigel 41
236 nigel 93 /a$/Im
237 nigel 41 a
238     a\n
239 ph10 102 \Za\n
240     *** Failers
241 nigel 41 \Za
242 ph10 102
243 nigel 93 /\Aabc/Im
244 nigel 41
245 ph10 102 /^abc/Im
246 nigel 41
247 nigel 93 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
248 nigel 41 aaaaabbbbbcccccdef
249    
250 nigel 93 /(?<=foo)[ab]/IS
251 nigel 41
252 nigel 93 /(?<!foo)(alpha|omega)/IS
253 nigel 41
254 nigel 93 /(?!alphabet)[ab]/IS
255 nigel 41
256 nigel 93 /(?<=foo\n)^bar/Im
257 ph10 102 foo\nbarbar
258 nigel 75 ***Failers
259 ph10 102 rhubarb
260 nigel 75 barbell
261 ph10 102 abc\nbarton
262 nigel 41
263 nigel 93 /^(?<=foo\n)bar/Im
264 ph10 102 foo\nbarbar
265 nigel 75 ***Failers
266 ph10 102 rhubarb
267 nigel 75 barbell
268 ph10 102 abc\nbarton
269 nigel 75
270 nigel 93 /(?>^abc)/Im
271 nigel 41 abc
272     def\nabc
273     *** Failers
274 ph10 102 defabc
275 nigel 41
276     /(?<=ab(c+)d)ef/
277    
278     /(?<=ab(?<=c+)d)ef/
279    
280     /(?<=ab(c|de)f)g/
281    
282     /The next three are in testinput2 because they have variable length branches/
283    
284 nigel 93 /(?<=bullock|donkey)-cart/I
285 nigel 41 the bullock-cart
286     a donkey-cart race
287     *** Failers
288     cart
289 ph10 102 horse-and-cart
290    
291 nigel 93 /(?<=ab(?i)x|y|z)/I
292 nigel 41
293 nigel 93 /(?>.*)(?<=(abcd)|(xyz))/I
294 nigel 41 alphabetabcd
295     endingxyz
296    
297 nigel 93 /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
298 nigel 41 abxyZZ
299     abXyZZ
300     ZZZ
301     zZZ
302     bZZ
303 ph10 102 BZZ
304 nigel 41 *** Failers
305 ph10 102 ZZ
306     abXYZZ
307 nigel 41 zzz
308 ph10 102 bzz
309 nigel 41
310 nigel 93 /(?<!(foo)a)bar/I
311 nigel 41 bar
312 ph10 102 foobbar
313 nigel 41 *** Failers
314 ph10 102 fooabar
315 nigel 41
316 nigel 93 /This one is here because Perl 5.005_02 doesn't fail it/I
317 nigel 41
318 nigel 93 /^(a)?(?(1)a|b)+$/I
319 nigel 41 *** Failers
320 ph10 102 a
321 nigel 41
322 ph10 488 /This one is here because Perl behaves differently; see also the following/I
323 nigel 41
324 nigel 93 /^(a\1?){4}$/I
325 ph10 488 aaaa
326 nigel 41 aaaaaa
327 ph10 488
328     /Perl does not fail these two for the final subjects. Neither did PCRE until/
329     /release 8.01. The problem is in backtracking into a subpattern that contains/
330     /a recursive reference to itself. PCRE has now made these into atomic patterns./
331 ph10 102
332 ph10 488 /^(xa|=?\1a){2}$/
333     xa=xaa
334     ** Failers
335     xa=xaaa
336    
337     /^(xa|=?\1a)+$/
338     xa=xaa
339     ** Failers
340     xa=xaaa
341    
342 nigel 93 /These are syntax tests from Perl 5.005/I
343 nigel 41
344     /a[b-a]/
345    
346     /a[]b/
347    
348     /a[/
349    
350     /*a/
351    
352     /(*)b/
353    
354     /abc)/
355    
356     /(abc/
357    
358     /a**/
359    
360     /)(/
361    
362     /\1/
363    
364     /\2/
365    
366     /(a)|\2/
367    
368 nigel 93 /a[b-a]/Ii
369 nigel 41
370 nigel 93 /a[]b/Ii
371 nigel 41
372 nigel 93 /a[/Ii
373 nigel 41
374 nigel 93 /*a/Ii
375 nigel 41
376 nigel 93 /(*)b/Ii
377 nigel 41
378 nigel 93 /abc)/Ii
379 nigel 41
380 nigel 93 /(abc/Ii
381 nigel 41
382 nigel 93 /a**/Ii
383 nigel 41
384 nigel 93 /)(/Ii
385 nigel 41
386     /:(?:/
387    
388     /(?<%)b/
389    
390     /a(?{)b/
391    
392     /a(?{{})b/
393    
394     /a(?{}})b/
395    
396     /a(?{"{"})b/
397    
398     /a(?{"{"}})b/
399    
400     /(?(1?)a|b)/
401    
402     /[a[:xyz:/
403    
404     /(?<=x+)y/
405    
406     /a{37,17}/
407    
408     /abc/\
409    
410     /abc/\i
411    
412 nigel 93 /(a)bc(d)/I
413 nigel 41 abcd
414     abcd\C2
415     abcd\C5
416 ph10 102
417 nigel 93 /(.{20})/I
418 nigel 41 abcdefghijklmnopqrstuvwxyz
419     abcdefghijklmnopqrstuvwxyz\C1
420     abcdefghijklmnopqrstuvwxyz\G1
421 ph10 102
422 nigel 93 /(.{15})/I
423 nigel 41 abcdefghijklmnopqrstuvwxyz
424     abcdefghijklmnopqrstuvwxyz\C1\G1
425    
426 nigel 93 /(.{16})/I
427 nigel 41 abcdefghijklmnopqrstuvwxyz
428     abcdefghijklmnopqrstuvwxyz\C1\G1\L
429 ph10 102
430 nigel 93 /^(a|(bc))de(f)/I
431 ph10 102 adef\G1\G2\G3\G4\L
432     bcdef\G1\G2\G3\G4\L
433     adefghijk\C0
434    
435 nigel 93 /^abc\00def/I
436 ph10 102 abc\00def\L\C0
437    
438     /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
439     )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
440 ph10 162 )?)?)?)?)?)?)?)?)?otherword/I
441 nigel 41
442 ph10 161 /.*X/IDZ
443 nigel 41
444 ph10 161 /.*X/IDZs
445 nigel 41
446 ph10 161 /(.*X|^B)/IDZ
447 nigel 41
448 ph10 161 /(.*X|^B)/IDZs
449 ph10 102
450 ph10 161 /(?s)(.*X|^B)/IDZ
451 nigel 41
452 ph10 161 /(?s:.*X|^B)/IDZ
453 nigel 41
454 nigel 93 /\Biss\B/I+
455 nigel 41 Mississippi
456    
457 nigel 93 /iss/IG+
458 nigel 41 Mississippi
459    
460 nigel 93 /\Biss\B/IG+
461 nigel 41 Mississippi
462    
463 nigel 93 /\Biss\B/Ig+
464 nigel 41 Mississippi
465     *** Failers
466     Mississippi\A
467    
468 nigel 93 /(?<=[Ms])iss/Ig+
469 nigel 41 Mississippi
470    
471 nigel 93 /(?<=[Ms])iss/IG+
472 nigel 41 Mississippi
473    
474 nigel 93 /^iss/Ig+
475 nigel 41 ississippi
476 ph10 102
477 nigel 93 /.*iss/Ig+
478 ph10 102 abciss\nxyzisspqr
479 nigel 41
480 nigel 93 /.i./I+g
481 nigel 41 Mississippi
482     Mississippi\A
483     Missouri river
484 ph10 102 Missouri river\A
485 nigel 41
486 nigel 93 /^.is/I+g
487 nigel 41 Mississippi
488    
489 nigel 93 /^ab\n/Ig+
490 nigel 41 ab\nab\ncd
491    
492 nigel 93 /^ab\n/Img+
493 nigel 41 ab\nab\ncd
494    
495 nigel 93 /abc/I
496 nigel 41
497 nigel 93 /abc|bac/I
498 nigel 41
499 nigel 93 /(abc|bac)/I
500 nigel 41
501 nigel 93 /(abc|(c|dc))/I
502 nigel 41
503 nigel 93 /(abc|(d|de)c)/I
504 nigel 41
505 nigel 93 /a*/I
506 nigel 41
507 nigel 93 /a+/I
508 nigel 41
509 nigel 93 /(baa|a+)/I
510 nigel 41
511 nigel 93 /a{0,3}/I
512 nigel 41
513 nigel 93 /baa{3,}/I
514 nigel 41
515 nigel 93 /"([^\\"]+|\\.)*"/I
516 nigel 41
517 nigel 93 /(abc|ab[cd])/I
518 nigel 41
519 nigel 93 /(a|.)/I
520 nigel 41
521 nigel 93 /a|ba|\w/I
522 nigel 41
523 nigel 93 /abc(?=pqr)/I
524 nigel 41
525 nigel 93 /...(?<=abc)/I
526 nigel 41
527 nigel 93 /abc(?!pqr)/I
528 nigel 41
529 nigel 93 /ab./I
530 nigel 41
531 nigel 93 /ab[xyz]/I
532 nigel 41
533 nigel 93 /abc*/I
534 nigel 41
535 nigel 93 /ab.c*/I
536 nigel 41
537 nigel 93 /a.c*/I
538 nigel 41
539 nigel 93 /.c*/I
540 nigel 41
541 nigel 93 /ac*/I
542 nigel 41
543 nigel 93 /(a.c*|b.c*)/I
544 nigel 41
545 nigel 93 /a.c*|aba/I
546 nigel 41
547 nigel 93 /.+a/I
548 nigel 41
549 nigel 93 /(?=abcda)a.*/I
550 nigel 41
551 nigel 93 /(?=a)a.*/I
552 nigel 41
553 nigel 93 /a(b)*/I
554 nigel 41
555 nigel 93 /a\d*/I
556 nigel 41
557 nigel 93 /ab\d*/I
558 nigel 41
559 nigel 93 /a(\d)*/I
560 nigel 41
561 nigel 93 /abcde{0,0}/I
562 nigel 41
563 nigel 93 /ab\d+/I
564 nigel 41
565 ph10 270 /a(?(1)b)(.)/I
566 nigel 41
567 ph10 270 /a(?(1)bag|big)(.)/I
568 nigel 41
569 ph10 270 /a(?(1)bag|big)*(.)/I
570 nigel 41
571 ph10 270 /a(?(1)bag|big)+(.)/I
572 nigel 41
573 ph10 270 /a(?(1)b..|b..)(.)/I
574 nigel 41
575 nigel 93 /ab\d{0}e/I
576 nigel 41
577 nigel 93 /a?b?/I
578 nigel 41 a
579     b
580     ab
581     \
582     *** Failers
583 ph10 102 \N
584    
585 nigel 93 /|-/I
586 nigel 41 abcd
587     -abc
588     \Nab-c
589     *** Failers
590 ph10 102 \Nabc
591 nigel 41
592 ph10 102 /^.?abcd/IS
593    
594 nigel 43 /\( # ( at start
595     (?: # Non-capturing bracket
596     (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
597     | # Or
598     (?R) # Recurse - i.e. nested bracketed string
599     )* # Zero or more contents
600     \) # Closing )
601 nigel 93 /Ix
602 nigel 43 (abcd)
603     (abcd)xyz
604     xyz(abcd)
605 ph10 102 (ab(xy)cd)pqr
606     (ab(xycd)pqr
607     () abc ()
608 nigel 43 12(abcde(fsh)xyz(foo(bar))lmno)89
609     *** Failers
610 ph10 102 abcd
611 nigel 43 abcd)
612 ph10 102 (abcd
613 nigel 43
614 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ixg
615 ph10 102 (ab(xy)cd)pqr
616 nigel 43 1(abcd)(x(y)z)pqr
617    
618 nigel 93 /\( (?: (?>[^()]+) | (?R) ) \) /Ix
619 nigel 43 (abcd)
620     (ab(xy)cd)
621 ph10 102 (a(b(c)d)e)
622     ((ab))
623 nigel 43 *** Failers
624 ph10 102 ()
625 nigel 43
626 nigel 93 /\( (?: (?>[^()]+) | (?R) )? \) /Ix
627 nigel 43 ()
628     12(abcde(fsh)xyz(foo(bar))lmno)89
629    
630 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ix
631 nigel 43 (ab(xy)cd)
632    
633 nigel 93 /\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
634 nigel 43 (ab(xy)cd)
635    
636 nigel 93 /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
637 nigel 43 (ab(xy)cd)
638     (123ab(xy)cd)
639    
640 nigel 93 /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
641 nigel 43 (ab(xy)cd)
642     (123ab(xy)cd)
643    
644 nigel 93 /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
645 nigel 43 (ab(xy)cd)
646    
647 nigel 93 /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
648 nigel 43 (abcd(xyz<p>qrs)123)
649    
650 nigel 93 /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
651 nigel 43 (ab(cd)ef)
652     (ab(cd(ef)gh)ij)
653    
654 ph10 161 /^[[:alnum:]]/DZ
655 nigel 43
656 ph10 161 /^[[:^alnum:]]/DZ
657 nigel 75
658 ph10 161 /^[[:alpha:]]/DZ
659 nigel 75
660 ph10 161 /^[[:^alpha:]]/DZ
661 ph10 102
662 nigel 87 /[_[:alpha:]]/IS
663    
664 ph10 161 /^[[:ascii:]]/DZ
665 nigel 43
666 ph10 161 /^[[:^ascii:]]/DZ
667 nigel 75
668 ph10 161 /^[[:blank:]]/DZ
669 nigel 63
670 ph10 161 /^[[:^blank:]]/DZ
671 nigel 87
672     /[\n\x0b\x0c\x0d[:blank:]]/IS
673    
674 ph10 161 /^[[:cntrl:]]/DZ
675 nigel 43
676 ph10 161 /^[[:digit:]]/DZ
677 nigel 43
678 ph10 161 /^[[:graph:]]/DZ
679 nigel 43
680 ph10 161 /^[[:lower:]]/DZ
681 nigel 43
682 ph10 161 /^[[:print:]]/DZ
683 nigel 43
684 ph10 161 /^[[:punct:]]/DZ
685 nigel 43
686 ph10 161 /^[[:space:]]/DZ
687 nigel 43
688 ph10 161 /^[[:upper:]]/DZ
689 nigel 43
690 ph10 161 /^[[:xdigit:]]/DZ
691 nigel 43
692 ph10 161 /^[[:word:]]/DZ
693 nigel 43
694 ph10 161 /^[[:^cntrl:]]/DZ
695 nigel 43
696 ph10 161 /^[12[:^digit:]]/DZ
697 nigel 43
698 ph10 161 /^[[:^blank:]]/DZ
699 nigel 63
700 ph10 161 /[01[:alpha:]%]/DZ
701 nigel 43
702 nigel 93 /[[.ch.]]/I
703 nigel 43
704 nigel 93 /[[=ch=]]/I
705 nigel 43
706 nigel 93 /[[:rhubarb:]]/I
707 nigel 43
708 nigel 93 /[[:upper:]]/Ii
709 nigel 43 A
710 ph10 102 a
711    
712 nigel 93 /[[:lower:]]/Ii
713 nigel 43 A
714 ph10 102 a
715 nigel 43
716 nigel 93 /((?-i)[[:lower:]])[[:lower:]]/Ii
717 nigel 43 ab
718     aB
719     *** Failers
720     Ab
721 ph10 102 AB
722 nigel 43
723 nigel 93 /[\200-\110]/I
724 nigel 49
725 nigel 93 /^(?(0)f|b)oo/I
726 nigel 51
727 nigel 93 /This one's here because of the large output vector needed/I
728 nigel 53
729 nigel 93 /(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
730 nigel 53 \O900 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 ABC ABC
731    
732 nigel 93 /This one's here because Perl does this differently and PCRE can't at present/I
733 nigel 53
734 nigel 93 /(main(O)?)+/I
735 nigel 53 mainmain
736     mainOmain
737 ph10 102
738 nigel 93 /These are all cases where Perl does it differently (nested captures)/I
739 nigel 63
740 nigel 93 /^(a(b)?)+$/I
741 nigel 63 aba
742 ph10 102
743 nigel 93 /^(aa(bb)?)+$/I
744 ph10 102 aabbaa
745    
746 nigel 93 /^(aa|aa(bb))+$/I
747 ph10 102 aabbaa
748    
749 nigel 93 /^(aa(bb)??)+$/I
750 ph10 102 aabbaa
751    
752 nigel 93 /^(?:aa(bb)?)+$/I
753 ph10 102 aabbaa
754    
755 nigel 93 /^(aa(b(b))?)+$/I
756 ph10 102 aabbaa
757 nigel 63
758 nigel 93 /^(?:aa(b(b))?)+$/I
759 ph10 102 aabbaa
760 nigel 63
761 nigel 93 /^(?:aa(b(?:b))?)+$/I
762 ph10 102 aabbaa
763 nigel 63
764 nigel 93 /^(?:aa(bb(?:b))?)+$/I
765 ph10 102 aabbbaa
766    
767 nigel 93 /^(?:aa(b(?:bb))?)+$/I
768 ph10 102 aabbbaa
769 nigel 63
770 nigel 93 /^(?:aa(?:b(b))?)+$/I
771 ph10 102 aabbaa
772 nigel 63
773 nigel 93 /^(?:aa(?:b(bb))?)+$/I
774 ph10 102 aabbbaa
775 nigel 63
776 nigel 93 /^(aa(b(bb))?)+$/I
777 ph10 102 aabbbaa
778 nigel 63
779 nigel 93 /^(aa(bb(bb))?)+$/I
780 ph10 102 aabbbbaa
781 nigel 63
782 ph10 102 /--------------------------------------------------------------------/I
783    
784 ph10 162 /#/IxDZ
785 nigel 63
786 ph10 162 /a#/IxDZ
787 nigel 63
788 ph10 161 /[\s]/DZ
789 nigel 63
790 ph10 161 /[\S]/DZ
791 nigel 63
792 ph10 161 /a(?i)b/DZ
793 nigel 63 ab
794     aB
795 ph10 102 *** Failers
796     AB
797 nigel 63
798 ph10 161 /(a(?i)b)/DZ
799 nigel 63 ab
800     aB
801 ph10 102 *** Failers
802     AB
803    
804 ph10 161 / (?i)abc/IxDZ
805 nigel 63
806     /#this is a comment
807 ph10 161 (?i)abc/IxDZ
808 nigel 63
809 ph10 161 /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
810 nigel 63
811 ph10 161 /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
812 nigel 63
813 ph10 161 /\Q\E/DZ
814 nigel 63 \
815    
816 ph10 161 /\Q\Ex/DZ
817 nigel 63
818 ph10 161 / \Q\E/DZ
819 nigel 63
820 ph10 161 /a\Q\E/DZ
821 nigel 63 abc
822     bca
823 ph10 102 bac
824 nigel 63
825 ph10 161 /a\Q\Eb/DZ
826 nigel 63 abc
827    
828 ph10 161 /\Q\Eabc/DZ
829 nigel 63
830 ph10 161 /x*+\w/DZ
831 nigel 63 *** Failers
832     xxxxx
833 ph10 102
834 ph10 161 /x?+/DZ
835 nigel 63
836 ph10 161 /x++/DZ
837 nigel 63
838 ph10 161 /x{1,3}+/DZ
839 nigel 63
840 ph10 161 /(x)*+/DZ
841 nigel 63
842 nigel 93 /^(\w++|\s++)*$/I
843 nigel 63 now is the time for all good men to come to the aid of the party
844     *** Failers
845     this is not a line with only words and spaces!
846 ph10 102
847 nigel 93 /(\d++)(\w)/I
848 nigel 63 12345a
849     *** Failers
850 ph10 102 12345+
851 nigel 63
852 nigel 93 /a++b/I
853 nigel 63 aaab
854    
855 nigel 93 /(a++b)/I
856 nigel 63 aaab
857    
858 nigel 93 /(a++)b/I
859 nigel 63 aaab
860    
861 nigel 93 /([^()]++|\([^()]*\))+/I
862 nigel 63 ((abc(ade)ufh()()x
863 ph10 102
864     /\(([^()]++|\([^()]+\))+\)/I
865 nigel 63 (abc)
866     (abc(def)xyz)
867     *** Failers
868 ph10 102 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
869 nigel 63
870 ph10 161 /(abc){1,3}+/DZ
871 nigel 63
872 nigel 93 /a+?+/I
873 nigel 63
874 nigel 93 /a{2,3}?+b/I
875 nigel 63
876 nigel 93 /(?U)a+?+/I
877 nigel 63
878 nigel 93 /a{2,3}?+b/IU
879 nigel 63
880 ph10 161 /x(?U)a++b/DZ
881 nigel 63 xaaaab
882    
883 ph10 161 /(?U)xa++b/DZ
884 nigel 63 xaaaab
885    
886 ph10 161 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
887 nigel 63
888 ph10 161 /^x(?U)a+b/DZ
889 nigel 63
890 ph10 161 /^x(?U)(a+)b/DZ
891 nigel 63
892 nigel 93 /[.x.]/I
893 nigel 63
894 nigel 93 /[=x=]/I
895 nigel 63
896 nigel 93 /[:x:]/I
897 nigel 63
898 nigel 93 /\l/I
899 nigel 63
900 nigel 93 /\L/I
901 nigel 63
902 nigel 93 /\N{name}/I
903 nigel 63
904 nigel 93 /\u/I
905 nigel 63
906 nigel 93 /\U/I
907 nigel 63
908 nigel 93 /[/I
909 nigel 63
910 nigel 93 /[a-/I
911 nigel 63
912 nigel 93 /[[:space:]/I
913 nigel 63
914 ph10 162 /[\s]/IDZ
915 nigel 63
916 ph10 162 /[[:space:]]/IDZ
917 nigel 63
918 ph10 162 /[[:space:]abcde]/IDZ
919 nigel 63
920 nigel 93 /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
921 nigel 63 <>
922     <abcd>
923     <abc <123> hij>
924     <abc <def> hij>
925 ph10 102 <abc<>def>
926     <abc<>
927 nigel 63 *** Failers
928     <abc
929    
930 ph10 162 |8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
931 nigel 63
932 ph10 162 |\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
933 nigel 63
934     /(.*)\d+\1/I
935    
936     /(.*)\d+/I
937 ph10 102
938 nigel 63 /(.*)\d+\1/Is
939    
940     /(.*)\d+/Is
941    
942     /(.*(xyz))\d+\2/I
943    
944     /((.*))\d+\1/I
945     abc123bc
946 ph10 102
947 nigel 63 /a[b]/I
948    
949     /(?=a).*/I
950    
951 nigel 93 /(?=abc).xyz/IiI
952 nigel 63
953     /(?=abc)(?i).xyz/I
954    
955     /(?=a)(?=b)/I
956    
957     /(?=.)a/I
958    
959     /((?=abcda)a)/I
960    
961     /((?=abcda)ab)/I
962    
963     /()a/I
964    
965 ph10 270 /(?(1)ab|ac)(.)/I
966 nigel 63
967 ph10 270 /(?(1)abz|acz)(.)/I
968 nigel 63
969 ph10 270 /(?(1)abz)(.)/I
970 nigel 63
971 ph10 270 /(?(1)abz)(1)23/I
972 nigel 63
973     /(a)+/I
974    
975     /(a){2,3}/I
976    
977     /(a)*/I
978    
979     /[a]/I
980    
981     /[ab]/I
982    
983     /[ab]/IS
984    
985     /[^a]/I
986    
987     /\d456/I
988    
989     /\d456/IS
990    
991     /a^b/I
992    
993 nigel 93 /^a/Im
994 nigel 63 abcde
995 ph10 102 xy\nabc
996     *** Failers
997     xyabc
998 nigel 63
999     /c|abc/I
1000    
1001     /(?i)[ab]/IS
1002    
1003     /[ab](?i)cd/IS
1004    
1005 nigel 93 /abc(?C)def/I
1006 nigel 63 abcdef
1007 ph10 102 1234abcdef
1008 nigel 63 *** Failers
1009     abcxyz
1010 ph10 102 abcxyzf
1011 nigel 63
1012 nigel 93 /abc(?C)de(?C1)f/I
1013 nigel 63 123abcdef
1014 ph10 102
1015 ph10 612 /(?C1)\dabc(?C2)def/IS
1016 nigel 63 1234abcdef
1017     *** Failers
1018 ph10 102 abcdef
1019    
1020 ph10 612 /(?C1)\dabc(?C2)def/ISS
1021     1234abcdef
1022     *** Failers
1023     abcdef
1024    
1025 nigel 93 /(?C255)ab/I
1026 nigel 63
1027 nigel 93 /(?C256)ab/I
1028 nigel 63
1029 ph10 102 /(?Cab)xx/I
1030 nigel 63
1031 nigel 93 /(?C12vr)x/I
1032 nigel 63
1033 nigel 93 /abc(?C)def/I
1034 nigel 63 *** Failers
1035     \x83\x0\x61bcdef
1036    
1037 nigel 93 /(abc)(?C)de(?C1)f/I
1038 nigel 63 123abcdef
1039 ph10 102 123abcdef\C+
1040     123abcdef\C-
1041 nigel 63 *** Failers
1042 ph10 102 123abcdef\C!1
1043    
1044 nigel 93 /(?C0)(abc(?C1))*/I
1045 nigel 63 abcabcabc
1046 ph10 102 abcabc\C!1!3
1047 nigel 63 *** Failers
1048 ph10 102 abcabcabc\C!1!3
1049 nigel 63
1050 nigel 93 /(\d{3}(?C))*/I
1051 nigel 63 123\C+
1052     123456\C+
1053 ph10 102 123456789\C+
1054 nigel 63
1055 nigel 93 /((xyz)(?C)p|(?C1)xyzabc)/I
1056 nigel 63 xyzabc\C+
1057    
1058 nigel 93 /(X)((xyz)(?C)p|(?C1)xyzabc)/I
1059 nigel 63 Xxyzabc\C+
1060    
1061 nigel 93 /(?=(abc))(?C)abcdef/I
1062 nigel 63 abcdef\C+
1063 ph10 102
1064 nigel 93 /(?!(abc)(?C1)d)(?C2)abcxyz/I
1065 ph10 102 abcxyz\C+
1066 nigel 63
1067 nigel 93 /(?<=(abc)(?C))xyz/I
1068 nigel 63 abcxyz\C+
1069 ph10 102
1070 nigel 93 /a(b+)(c*)(?C1)/I
1071 nigel 77 abbbbbccc\C*1
1072    
1073 nigel 93 /a(b+?)(c*?)(?C1)/I
1074 nigel 77 abbbbbccc\C*1
1075 nigel 63
1076 ph10 102 /(?C)abc/I
1077    
1078 nigel 93 /(?C)^abc/I
1079 nigel 63
1080 nigel 93 /(?C)a|b/IS
1081 nigel 63
1082 nigel 93 /(?R)/I
1083 nigel 63
1084 nigel 93 /(a|(?R))/I
1085 nigel 63
1086 nigel 93 /(ab|(bc|(de|(?R))))/I
1087 nigel 63
1088 nigel 93 /x(ab|(bc|(de|(?R))))/I
1089 nigel 63 xab
1090     xbc
1091     xde
1092     xxab
1093     xxxab
1094     *** Failers
1095 ph10 102 xyab
1096 nigel 63
1097 nigel 93 /(ab|(bc|(de|(?1))))/I
1098 nigel 63
1099 nigel 93 /x(ab|(bc|(de|(?1)x)x)x)/I
1100 nigel 63
1101 nigel 93 /^([^()]|\((?1)*\))*$/I
1102 nigel 63 abc
1103     a(b)c
1104 ph10 102 a(b(c))d
1105 nigel 63 *** Failers)
1106 ph10 102 a(b(c)d
1107 nigel 63
1108 nigel 93 /^>abc>([^()]|\((?1)*\))*<xyz<$/I
1109 nigel 63 >abc>123<xyz<
1110     >abc>1(2)3<xyz<
1111     >abc>(1(2)3)<xyz<
1112    
1113 ph10 161 /(a(?1)b)/DZ
1114 nigel 63
1115 ph10 161 /(a(?1)+b)/DZ
1116 nigel 63
1117 nigel 93 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1118 nigel 63 12
1119     (((2+2)*-3)-7)
1120     -12
1121     *** Failers
1122     ((2+2)*-3)-7)
1123 ph10 102
1124 nigel 93 /^(x(y|(?1){2})z)/I
1125 nigel 63 xyz
1126 ph10 102 xxyzxyzz
1127 nigel 63 *** Failers
1128     xxyzz
1129 ph10 102 xxyzxyzxyzz
1130 nigel 63
1131 nigel 93 /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
1132 nigel 63 <>
1133     <abcd>
1134     <abc <123> hij>
1135     <abc <def> hij>
1136 ph10 102 <abc<>def>
1137     <abc<>
1138 nigel 63 *** Failers
1139     <abc
1140    
1141 nigel 93 /(?1)/I
1142 nigel 63
1143 nigel 93 /((?2)(abc)/I
1144 nigel 63
1145 nigel 93 /^(abc)def(?1)/I
1146 nigel 63 abcdefabc
1147    
1148 nigel 93 /^(a|b|c)=(?1)+/I
1149 nigel 63 a=a
1150     a=b
1151 ph10 102 a=bc
1152 nigel 63
1153 nigel 93 /^(a|b|c)=((?1))+/I
1154 nigel 63 a=a
1155     a=b
1156 ph10 102 a=bc
1157 nigel 63
1158 ph10 161 /a(?P<name1>b|c)d(?P<longername2>e)/DZ
1159 nigel 63 abde
1160 ph10 102 acde
1161 nigel 63
1162 ph10 161 /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
1163 nigel 63
1164 ph10 161 /(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
1165 nigel 63
1166 nigel 93 /^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii
1167 nigel 63 1221
1168     Satan, oscillate my metallic sonatas!
1169     A man, a plan, a canal: Panama!
1170 ph10 102 Able was I ere I saw Elba.
1171 nigel 63 *** Failers
1172 ph10 102 The quick brown fox
1173    
1174 nigel 93 /((?(R)a|b))\1(?1)?/I
1175 nigel 63 bb
1176 ph10 102 bbaa
1177 nigel 63
1178 nigel 93 /(.*)a/Is
1179 nigel 63
1180 nigel 93 /(.*)a\1/Is
1181 nigel 63
1182 nigel 93 /(.*)a(b)\2/Is
1183 nigel 63
1184 nigel 93 /((.*)a|(.*)b)z/Is
1185 nigel 63
1186 nigel 93 /((.*)a|(.*)b)z\1/Is
1187 nigel 63
1188 nigel 93 /((.*)a|(.*)b)z\2/Is
1189 nigel 63
1190 nigel 93 /((.*)a|(.*)b)z\3/Is
1191 nigel 63
1192 nigel 93 /((.*)a|^(.*)b)z\3/Is
1193 nigel 63
1194 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
1195 nigel 63
1196 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
1197 nigel 63
1198 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
1199 nigel 63
1200 ph10 161 /(a)(bc)/INDZ
1201 nigel 63 abc
1202    
1203 ph10 161 /(?P<one>a)(bc)/INDZ
1204 nigel 63 abc
1205    
1206 ph10 161 /(a)(?P<named>bc)/INDZ
1207 nigel 63
1208 nigel 93 /(a+)*zz/I
1209 nigel 63 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1210     aaaaaaaaaaaaaz\M
1211    
1212 nigel 93 /(aaa(?C1)bbb|ab)/I
1213 nigel 63 aaabbb
1214     aaabbb\C*0
1215     aaabbb\C*1
1216     aaabbb\C*-1
1217    
1218 nigel 93 /ab(?P<one>cd)ef(?P<two>gh)/I
1219 nigel 63 abcdefgh
1220     abcdefgh\C1\Gtwo
1221     abcdefgh\Cone\Ctwo
1222 ph10 102 abcdefgh\Cthree
1223 nigel 63
1224 ph10 161 /(?P<Tes>)(?P<Test>)/DZ
1225 nigel 63
1226 ph10 161 /(?P<Test>)(?P<Tes>)/DZ
1227 nigel 63
1228 nigel 93 /(?P<Z>zz)(?P<A>aa)/I
1229 nigel 63 zzaa\CZ
1230     zzaa\CA
1231    
1232 nigel 93 /(?P<x>eks)(?P<x>eccs)/I
1233 nigel 65
1234 nigel 93 /(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
1235 nigel 65
1236 nigel 93 "\[((?P<elem>\d+)(,(?P>elem))*)\]"I
1237 nigel 73 [10,20,30,5,5,4,4,2,43,23,4234]
1238     *** Failers
1239 ph10 102 []
1240 nigel 73
1241 nigel 93 "\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
1242 nigel 73 [10,20,30,5,5,4,4,2,43,23,4234]
1243 ph10 102 []
1244 nigel 73
1245 ph10 161 /(a(b(?2)c))?/DZ
1246 nigel 73
1247 ph10 161 /(a(b(?2)c))*/DZ
1248 nigel 73
1249 ph10 161 /(a(b(?2)c)){0,2}/DZ
1250 nigel 73
1251 ph10 161 /[ab]{1}+/DZ
1252 nigel 73
1253 nigel 93 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
1254 nigel 73 Baby Bjorn Active Carrier - With free SHIPPING!!
1255    
1256 nigel 93 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
1257 nigel 73 Baby Bjorn Active Carrier - With free SHIPPING!!
1258 ph10 102
1259 ph10 161 /a*.*b/ISDZ
1260 nigel 73
1261 ph10 161 /(a|b)*.?c/ISDZ
1262 nigel 73
1263 ph10 161 /abc(?C255)de(?C)f/DZ
1264 nigel 75
1265 ph10 161 /abcde/ICDZ
1266 nigel 75 abcde
1267 ph10 102 abcdfe
1268    
1269 ph10 612 /a*b/ICDZS
1270 nigel 75 ab
1271     aaaab
1272 ph10 102 aaaacb
1273 nigel 75
1274 ph10 612 /a*b/ICDZSS
1275     ab
1276     aaaab
1277     aaaacb
1278    
1279 ph10 161 /a+b/ICDZ
1280 nigel 75 ab
1281     aaaab
1282 ph10 102 aaaacb
1283 nigel 75
1284 ph10 612 /(abc|def)x/ICDZS
1285 nigel 75 abcx
1286     defx
1287 ph10 612 ** Failers
1288 nigel 75 abcdefzx
1289    
1290 ph10 612 /(abc|def)x/ICDZSS
1291     abcx
1292     defx
1293     ** Failers
1294     abcdefzx
1295    
1296 nigel 93 /(ab|cd){3,4}/IC
1297 nigel 75 ababab
1298     abcdabcd
1299 ph10 102 abcdcdcdcdcd
1300 nigel 75
1301 ph10 612 /([ab]{,4}c|xy)/ICDZS
1302 nigel 75 Note: that { does NOT introduce a quantifier
1303    
1304 ph10 612 /([ab]{,4}c|xy)/ICDZSS
1305     Note: that { does NOT introduce a quantifier
1306    
1307 ph10 161 /([ab]{1,4}c|xy){4,5}?123/ICDZ
1308 nigel 75 aacaacaacaacaac123
1309    
1310     /\b.*/I
1311     ab cd\>1
1312 ph10 102
1313     /\b.*/Is
1314 nigel 75 ab cd\>1
1315 ph10 102
1316 nigel 75 /(?!.bcd).*/I
1317 ph10 102 Xbcd12345
1318 nigel 75
1319 nigel 93 /abcde/I
1320 nigel 75 ab\P
1321     abc\P
1322     abcd\P
1323 ph10 102 abcde\P
1324 nigel 75 the quick brown abc\P
1325     ** Failers\P
1326     the quick brown abxyz fox\P
1327 ph10 102
1328 nigel 93 "^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
1329 nigel 75 13/05/04\P
1330     13/5/2004\P
1331 ph10 102 02/05/09\P
1332 nigel 75 1\P
1333     1/2\P
1334     1/2/0\P
1335 ph10 102 1/2/04\P
1336 nigel 75 0\P
1337     02/\P
1338 ph10 102 02/0\P
1339 nigel 75 02/1\P
1340     ** Failers\P
1341     \P
1342     123\P
1343     33/4/04\P
1344     3/13/04\P
1345     0/1/2003\P
1346 ph10 102 0/\P
1347     02/0/\P
1348     02/13\P
1349 nigel 75
1350     /0{0,2}ABC/I
1351 ph10 102
1352 nigel 75 /\d{3,}ABC/I
1353 ph10 102
1354 nigel 75 /\d*ABC/I
1355    
1356     /[abc]+DE/I
1357    
1358 nigel 93 /[abc]?123/I
1359 nigel 75 123\P
1360     a\P
1361     b\P
1362     c\P
1363     c12\P
1364 ph10 102 c123\P
1365 nigel 75
1366 nigel 93 /^(?:\d){3,5}X/I
1367 nigel 75 1\P
1368     123\P
1369     123X
1370     1234\P
1371     1234X
1372     12345\P
1373 ph10 102 12345X
1374     *** Failers
1375     1X
1376     123456\P
1377 nigel 75
1378 ph10 612 /abc/IS>testsavedregex
1379 nigel 75 <testsavedregex
1380     abc
1381     ** Failers
1382     bca
1383 ph10 102
1384 ph10 612 /abc/ISS>testsavedregex
1385 nigel 75 <testsavedregex
1386     abc
1387     ** Failers
1388     bca
1389    
1390 ph10 612 /abc/IFS>testsavedregex
1391     <testsavedregex
1392     abc
1393     ** Failers
1394     bca
1395    
1396     /abc/IFSS>testsavedregex
1397     <testsavedregex
1398     abc
1399     ** Failers
1400     bca
1401    
1402 nigel 93 /(a|b)/IS>testsavedregex
1403 nigel 75 <testsavedregex
1404     abc
1405     ** Failers
1406 ph10 102 def
1407    
1408 ph10 612 /(a|b)/ISS>testsavedregex
1409     <testsavedregex
1410     abc
1411     ** Failers
1412     def
1413    
1414 nigel 93 /(a|b)/ISF>testsavedregex
1415 nigel 75 <testsavedregex
1416     abc
1417     ** Failers
1418 ph10 102 def
1419    
1420 ph10 612 /(a|b)/ISSF>testsavedregex
1421     <testsavedregex
1422     abc
1423     ** Failers
1424     def
1425    
1426 nigel 93 ~<(\w+)/?>(.)*</(\1)>~smgI
1427 ph10 666 \J1024<!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
1428 nigel 75
1429     /^a/IF
1430    
1431 nigel 93 /line\nbreak/I
1432 nigel 77 this is a line\nbreak
1433 ph10 102 line one\nthis is a line\nbreak in the second line
1434 nigel 77
1435 nigel 93 /line\nbreak/If
1436 nigel 77 this is a line\nbreak
1437 ph10 102 ** Failers
1438     line one\nthis is a line\nbreak in the second line
1439 nigel 77
1440 nigel 93 /line\nbreak/Imf
1441 nigel 77 this is a line\nbreak
1442 ph10 102 ** Failers
1443     line one\nthis is a line\nbreak in the second line
1444 nigel 77
1445 nigel 93 /(?i)(?-i)AbCd/I
1446 nigel 79 AbCd
1447     ** Failers
1448 ph10 102 abcd
1449    
1450 nigel 93 /a{11111111111111111111}/I
1451 nigel 79
1452 nigel 93 /(){64294967295}/I
1453 nigel 81
1454 nigel 93 /(){2,4294967295}/I
1455 nigel 81
1456 nigel 93 "(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I
1457 nigel 81 abcdefghijklAkB
1458    
1459 nigel 93 "(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I
1460 nigel 81 abcdefghijklAkB
1461    
1462 nigel 93 "(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
1463 nigel 81 abcdefghijklAkB
1464    
1465 nigel 93 "(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I
1466 nigel 81 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1467    
1468 nigel 93 "(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I
1469 nigel 81 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1470    
1471 nigel 93 /[^()]*(?:\((?R)\)[^()]*)*/I
1472 nigel 87 (this(and)that
1473 ph10 102 (this(and)that)
1474 nigel 87 (this(and)that)stuff
1475    
1476 nigel 93 /[^()]*(?:\((?>(?R))\)[^()]*)*/I
1477 nigel 87 (this(and)that
1478 ph10 102 (this(and)that)
1479    
1480 nigel 93 /[^()]*(?:\((?R)\))*[^()]*/I
1481 nigel 87 (this(and)that
1482 ph10 102 (this(and)that)
1483 nigel 87
1484 nigel 93 /(?:\((?R)\))*[^()]*/I
1485 nigel 87 (this(and)that
1486 ph10 102 (this(and)that)
1487     ((this))
1488 nigel 87
1489 nigel 93 /(?:\((?R)\))|[^()]*/I
1490 nigel 87 (this(and)that
1491 ph10 102 (this(and)that)
1492 nigel 87 (this)
1493 ph10 102 ((this))
1494    
1495 nigel 93 /\x{0000ff}/I
1496 nigel 87
1497 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/I
1498 nigel 91
1499 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/IJ
1500 nigel 91 a1b\CA
1501 ph10 102 a2b\CA
1502 nigel 91 ** Failers
1503 ph10 102 a1b\CZ\CA
1504    
1505 nigel 93 /^(?P<A>a)(?P<A>b)/IJ
1506 nigel 91 ab\CA
1507 ph10 102
1508 nigel 93 /^(?P<A>a)(?P<A>b)|cd/IJ
1509 nigel 91 ab\CA
1510 ph10 102 cd\CA
1511    
1512 nigel 93 /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1513 ph10 102 cdefgh\CA
1514    
1515 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/IJ
1516 nigel 91 a1b\GA
1517 ph10 102 a2b\GA
1518 nigel 91 ** Failers
1519 ph10 102 a1b\GZ\GA
1520    
1521 nigel 93 /^(?P<A>a)(?P<A>b)/IJ
1522 nigel 91 ab\GA
1523 ph10 102
1524 nigel 93 /^(?P<A>a)(?P<A>b)|cd/IJ
1525 nigel 91 ab\GA
1526 ph10 102 cd\GA
1527    
1528 nigel 93 /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1529 ph10 102 cdefgh\GA
1530    
1531 nigel 93 /(?J)^((?P<A>a1)|(?P<A>a2)b)/I
1532 nigel 91 a1b\CA
1533 ph10 102 a2b\CA
1534    
1535 nigel 93 /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
1536 nigel 91
1537     / In this next test, J is not set at the outer level; consequently it isn't
1538 ph10 102 set in the pattern's options; consequently pcre_get_named_substring() produces
1539 nigel 93 a random value. /Ix
1540 nigel 91
1541 nigel 93 /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
1542 nigel 91 a bc d\CA\CB\CC
1543    
1544 nigel 93 /^(?P<A>a)?(?(A)a|b)/I
1545 nigel 91 aabc
1546     bc
1547     ** Failers
1548 ph10 102 abc
1549 nigel 91
1550 nigel 93 /(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
1551 nigel 91 bXaX
1552    
1553 nigel 93 /(?:(?(2y)a|b)(X))+/I
1554 nigel 91
1555 nigel 93 /(?:(?(ZA)a|b)(?P<ZZ>X))+/I
1556 nigel 91
1557 nigel 93 /(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
1558 nigel 91 bbXaaX
1559    
1560 nigel 93 /(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
1561 nigel 91 (b)\\Xa\\X
1562    
1563 nigel 93 /(?P<ABC/I
1564 nigel 91
1565 nigel 93 /(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1566 nigel 91 bXXaYYaY
1567 ph10 102 bXYaXXaX
1568 nigel 91
1569 nigel 93 /()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1570 nigel 91 bXXaYYaY
1571    
1572 nigel 93 /\s*,\s*/IS
1573 nigel 91 \x0b,\x0b
1574 ph10 102 \x0c,\x0d
1575 nigel 91
1576 nigel 93 /^abc/Im
1577 nigel 91 xyz\nabc
1578     xyz\nabc\<lf>
1579     xyz\r\nabc\<lf>
1580     xyz\rabc\<cr>
1581     xyz\r\nabc\<crlf>
1582 ph10 102 ** Failers
1583 nigel 91 xyz\nabc\<cr>
1584     xyz\r\nabc\<cr>
1585     xyz\nabc\<crlf>
1586     xyz\rabc\<crlf>
1587     xyz\rabc\<lf>
1588 ph10 102
1589 nigel 93 /abc$/Im<lf>
1590 nigel 91 xyzabc
1591 ph10 102 xyzabc\n
1592     xyzabc\npqr
1593     xyzabc\r\<cr>
1594     xyzabc\rpqr\<cr>
1595     xyzabc\r\n\<crlf>
1596     xyzabc\r\npqr\<crlf>
1597 nigel 91 ** Failers
1598 ph10 102 xyzabc\r
1599     xyzabc\rpqr
1600     xyzabc\r\n
1601     xyzabc\r\npqr
1602    
1603 nigel 93 /^abc/Im<cr>
1604 nigel 91 xyz\rabcdef
1605     xyz\nabcdef\<lf>
1606 ph10 102 ** Failers
1607 nigel 91 xyz\nabcdef
1608 ph10 102
1609 nigel 93 /^abc/Im<lf>
1610 nigel 91 xyz\nabcdef
1611     xyz\rabcdef\<cr>
1612 ph10 102 ** Failers
1613 nigel 91 xyz\rabcdef
1614 ph10 102
1615 nigel 93 /^abc/Im<crlf>
1616 nigel 91 xyz\r\nabcdef
1617     xyz\rabcdef\<cr>
1618 ph10 102 ** Failers
1619 nigel 91 xyz\rabcdef
1620 ph10 102
1621 nigel 93 /^abc/Im<bad>
1622 nigel 91
1623 nigel 93 /abc/I
1624 nigel 91 xyz\rabc\<bad>
1625 ph10 102 abc
1626    
1627 nigel 93 /.*/I<lf>
1628 nigel 91 abc\ndef
1629     abc\rdef
1630     abc\r\ndef
1631     \<cr>abc\ndef
1632     \<cr>abc\rdef
1633     \<cr>abc\r\ndef
1634     \<crlf>abc\ndef
1635     \<crlf>abc\rdef
1636     \<crlf>abc\r\ndef
1637    
1638 nigel 93 /\w+(.)(.)?def/Is
1639 nigel 91 abc\ndef
1640     abc\rdef
1641     abc\r\ndef
1642    
1643 nigel 93 +((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
1644 nigel 91 /* this is a C style comment */\M
1645    
1646 nigel 93 /(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
1647 nigel 91
1648 nigel 93 /()()()()()()()()()()()()()()()()()()()()
1649     ()()()()()()()()()()()()()()()()()()()()
1650     ()()()()()()()()()()()()()()()()()()()()
1651     ()()()()()()()()()()()()()()()()()()()()
1652     ()()()()()()()()()()()()()()()()()()()()
1653     (.(.))/Ix
1654 ph10 102 XY\O400
1655 nigel 93
1656     /(a*b|(?i:c*(?-i)d))/IS
1657    
1658     /()[ab]xyz/IS
1659    
1660     /(|)[ab]xyz/IS
1661    
1662     /(|c)[ab]xyz/IS
1663    
1664     /(|c?)[ab]xyz/IS
1665    
1666     /(d?|c?)[ab]xyz/IS
1667    
1668     /(d?|c)[ab]xyz/IS
1669    
1670 ph10 161 /^a*b\d/DZ
1671 nigel 93
1672 ph10 161 /^a*+b\d/DZ
1673 nigel 93
1674 ph10 161 /^a*?b\d/DZ
1675 nigel 93
1676 ph10 161 /^a+A\d/DZ
1677 nigel 93 aaaA5
1678     ** Failers
1679 ph10 102 aaaa5
1680 nigel 93
1681 ph10 161 /^a*A\d/IiDZ
1682 nigel 93 aaaA5
1683     aaaa5
1684    
1685     /(a*|b*)[cd]/IS
1686    
1687     /(a+|b*)[cd]/IS
1688    
1689     /(a*|b+)[cd]/IS
1690    
1691     /(a+|b+)[cd]/IS
1692    
1693     /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1694     ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1695     (((
1696     a
1697     ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1698     ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1699 ph10 102 )))
1700     /Ix
1701 nigel 93 large nest
1702    
1703 ph10 162 /a*\d/BZ
1704 nigel 93
1705 ph10 162 /a*\D/BZ
1706 nigel 93
1707 ph10 162 /0*\d/BZ
1708 nigel 93
1709 ph10 162 /0*\D/BZ
1710 nigel 93
1711 ph10 162 /a*\s/BZ
1712 nigel 93
1713 ph10 162 /a*\S/BZ
1714 nigel 93
1715 ph10 162 / *\s/BZ
1716 nigel 93
1717 ph10 162 / *\S/BZ
1718 nigel 93
1719 ph10 162 /a*\w/BZ
1720 nigel 93
1721 ph10 162 /a*\W/BZ
1722 nigel 93
1723 ph10 162 /=*\w/BZ
1724 nigel 93
1725 ph10 162 /=*\W/BZ
1726 nigel 93
1727 ph10 162 /\d*a/BZ
1728 nigel 93
1729 ph10 162 /\d*2/BZ
1730 nigel 93
1731 ph10 162 /\d*\d/BZ
1732 nigel 93
1733 ph10 162 /\d*\D/BZ
1734 nigel 93
1735 ph10 162 /\d*\s/BZ
1736 nigel 93
1737 ph10 162 /\d*\S/BZ
1738 nigel 93
1739 ph10 162 /\d*\w/BZ
1740 nigel 93
1741 ph10 162 /\d*\W/BZ
1742 nigel 93
1743 ph10 162 /\D*a/BZ
1744 nigel 93
1745 ph10 162 /\D*2/BZ
1746 nigel 93
1747 ph10 162 /\D*\d/BZ
1748 nigel 93
1749 ph10 162 /\D*\D/BZ
1750 nigel 93
1751 ph10 162 /\D*\s/BZ
1752 nigel 93
1753 ph10 162 /\D*\S/BZ
1754 nigel 93
1755 ph10 162 /\D*\w/BZ
1756 nigel 93
1757 ph10 162 /\D*\W/BZ
1758 nigel 93
1759 ph10 162 /\s*a/BZ
1760 nigel 93
1761 ph10 162 /\s*2/BZ
1762 nigel 93
1763 ph10 162 /\s*\d/BZ
1764 nigel 93
1765 ph10 162 /\s*\D/BZ
1766 nigel 93
1767 ph10 162 /\s*\s/BZ
1768 nigel 93
1769 ph10 162 /\s*\S/BZ
1770 nigel 93
1771 ph10 162 /\s*\w/BZ
1772 nigel 93
1773 ph10 162 /\s*\W/BZ
1774 nigel 93
1775 ph10 162 /\S*a/BZ
1776 nigel 93
1777 ph10 162 /\S*2/BZ
1778 nigel 93
1779 ph10 162 /\S*\d/BZ
1780 nigel 93
1781 ph10 162 /\S*\D/BZ
1782 nigel 93
1783 ph10 162 /\S*\s/BZ
1784 nigel 93
1785 ph10 162 /\S*\S/BZ
1786 nigel 93
1787 ph10 162 /\S*\w/BZ
1788 nigel 93
1789 ph10 162 /\S*\W/BZ
1790 nigel 93
1791 ph10 162 /\w*a/BZ
1792 nigel 93
1793 ph10 162 /\w*2/BZ
1794 nigel 93
1795 ph10 162 /\w*\d/BZ
1796 nigel 93
1797 ph10 162 /\w*\D/BZ
1798 nigel 93
1799 ph10 162 /\w*\s/BZ
1800 nigel 93
1801 ph10 162 /\w*\S/BZ
1802 nigel 93
1803 ph10 162 /\w*\w/BZ
1804 nigel 93
1805 ph10 162 /\w*\W/BZ
1806 nigel 93
1807 ph10 162 /\W*a/BZ
1808 nigel 93
1809 ph10 162 /\W*2/BZ
1810 nigel 93
1811 ph10 162 /\W*\d/BZ
1812 nigel 93
1813 ph10 162 /\W*\D/BZ
1814 nigel 93
1815 ph10 162 /\W*\s/BZ
1816 nigel 93
1817 ph10 162 /\W*\S/BZ
1818 nigel 93
1819 ph10 162 /\W*\w/BZ
1820 nigel 93
1821 ph10 162 /\W*\W/BZ
1822 nigel 93
1823 ph10 162 /[^a]+a/BZ
1824 nigel 93
1825 ph10 162 /[^a]+a/BZi
1826 nigel 93
1827 ph10 162 /[^a]+A/BZi
1828 nigel 93
1829 ph10 162 /[^a]+b/BZ
1830 nigel 93
1831 ph10 162 /[^a]+\d/BZ
1832 nigel 93
1833 ph10 162 /a*[^a]/BZ
1834 nigel 93
1835     /(?P<abc>x)(?P<xyz>y)/I
1836     xy\Cabc\Cxyz
1837    
1838     /(?<abc>x)(?'xyz'y)/I
1839     xy\Cabc\Cxyz
1840    
1841     /(?<abc'x)(?'xyz'y)/I
1842    
1843     /(?<abc>x)(?'xyz>y)/I
1844    
1845     /(?P'abc'x)(?P<xyz>y)/I
1846    
1847     /^(?:(?(ZZ)a|b)(?<ZZ>X))+/
1848     bXaX
1849     bXbX
1850     ** Failers
1851 ph10 102 aXaX
1852     aXbX
1853 nigel 93
1854     /^(?P>abc)(?<abcd>xxx)/
1855    
1856     /^(?P>abc)(?<abc>x|y)/
1857     xx
1858     xy
1859     yy
1860 ph10 102 yx
1861 nigel 93
1862     /^(?P>abc)(?P<abc>x|y)/
1863     xx
1864     xy
1865     yy
1866 ph10 102 yx
1867 nigel 93
1868     /^((?(abc)a|b)(?<abc>x|y))+/
1869     bxay
1870 ph10 102 bxby
1871 nigel 93 ** Failers
1872 ph10 102 axby
1873 nigel 93
1874     /^(((?P=abc)|X)(?<abc>x|y))+/
1875     XxXxxx
1876     XxXyyx
1877     XxXyxx
1878     ** Failers
1879 ph10 102 x
1880 nigel 93
1881     /^(?1)(abc)/
1882     abcabc
1883    
1884     /^(?:(?:\1|X)(a|b))+/
1885     Xaaa
1886 ph10 102 Xaba
1887 nigel 93
1888 ph10 162 /^[\E\Qa\E-\Qz\E]+/BZ
1889 ph10 102
1890 ph10 162 /^[a\Q]bc\E]/BZ
1891 ph10 102
1892 ph10 162 /^[a-\Q\E]/BZ
1893 nigel 93
1894 ph10 162 /^(?P>abc)[()](?<abc>)/BZ
1895 nigel 93
1896 ph10 162 /^((?(abc)y)[()](?P<abc>x))+/BZ
1897 nigel 93 (xy)x
1898    
1899 ph10 162 /^(?P>abc)\Q()\E(?<abc>)/BZ
1900 nigel 93
1901 ph10 162 /^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
1902 ph10 102
1903 nigel 93 /^(?P>abc) # this is (a comment)
1904 ph10 162 (?<abc>)/BZx
1905 nigel 93
1906     /^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
1907     1221
1908     Satan, oscillate my metallic sonatas!
1909     A man, a plan, a canal: Panama!
1910 ph10 102 Able was I ere I saw Elba.
1911 nigel 93 *** Failers
1912 ph10 102 The quick brown fox
1913    
1914 nigel 93 /(?=(\w+))\1:/I
1915     abcd:
1916    
1917     /(?=(?'abc'\w+))\k<abc>:/I
1918     abcd:
1919    
1920     /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1921     adaa
1922     ** Failers
1923     addd
1924 ph10 102 adbb
1925 nigel 93
1926     /(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
1927     bdaa
1928     bdab
1929     ** Failers
1930 ph10 102 bddd
1931 nigel 93
1932     /(?(<bc))/
1933    
1934 ph10 102 /(?(''))/
1935 nigel 93
1936     /(?('R')stuff)/
1937    
1938     /((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x
1939     abcabc1Xabc2XabcXabcabc
1940    
1941     /(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1942     abcabc1Xabc2XabcXabcabc
1943    
1944     /(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1945    
1946     /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1947     abcabc1Xabc2XabcXabcabc
1948    
1949     /^(?(DEFINE) abc | xyz ) /x
1950 ph10 102
1951 nigel 93 /(?(DEFINE) abc) xyz/xI
1952    
1953     /(a|)*\d/
1954     \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1955     \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
1956    
1957     /^a.b/<lf>
1958     a\rb
1959 ph10 102 a\nb\<cr>
1960 ph10 149 a\x85b\<anycrlf>
1961 nigel 93 ** Failers
1962     a\nb
1963     a\nb\<any>
1964 ph10 102 a\rb\<cr>
1965     a\rb\<any>
1966 ph10 149 a\x85b\<any>
1967     a\rb\<anycrlf>
1968 nigel 93
1969     /^abc./mgx<any>
1970 ph10 355 abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK
1971 nigel 93
1972     /abc.$/mgx<any>
1973 ph10 355 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9
1974 nigel 93
1975     /a/<cr><any>
1976    
1977     /a/<any><crlf>
1978    
1979 ph10 247 /^a\Rb/<bsr_unicode>
1980 nigel 93 a\nb
1981     a\rb
1982     a\r\nb
1983     a\x0bb
1984     a\x0cb
1985 ph10 102 a\x85b
1986 nigel 93 ** Failers
1987 ph10 102 a\n\rb
1988 nigel 93
1989 ph10 247 /^a\R*b/<bsr_unicode>
1990 nigel 93 ab
1991     a\nb
1992     a\rb
1993     a\r\nb
1994     a\x0bb
1995     a\x0cb
1996 ph10 102 a\x85b
1997     a\n\rb
1998     a\n\r\x85\x0cb
1999 nigel 93
2000 ph10 247 /^a\R+b/<bsr_unicode>
2001 nigel 93 a\nb
2002     a\rb
2003     a\r\nb
2004     a\x0bb
2005     a\x0cb
2006 ph10 102 a\x85b
2007     a\n\rb
2008     a\n\r\x85\x0cb
2009 nigel 93 ** Failers
2010 ph10 102 ab
2011    
2012 ph10 247 /^a\R{1,3}b/<bsr_unicode>
2013 nigel 93 a\nb
2014     a\n\rb
2015     a\n\r\x85b
2016 ph10 102 a\r\n\r\nb
2017     a\r\n\r\n\r\nb
2018 nigel 93 a\n\r\n\rb
2019 ph10 102 a\n\n\r\nb
2020 nigel 93 ** Failers
2021     a\n\n\n\rb
2022     a\r
2023    
2024 ph10 247 /^a[\R]b/<bsr_unicode>
2025 nigel 93 aRb
2026     ** Failers
2027 ph10 102 a\nb
2028 nigel 93
2029     /(?&abc)X(?<abc>P)/I
2030     abcPXP123
2031    
2032     /(?1)X(?<abc>P)/I
2033     abcPXP123
2034    
2035     /(?:a(?&abc)b)*(?<abc>x)/
2036     123axbaxbaxbx456
2037     123axbaxbaxb456
2038 ph10 102
2039 nigel 93 /(?:a(?&abc)b){1,5}(?<abc>x)/
2040     123axbaxbaxbx456
2041    
2042     /(?:a(?&abc)b){2,5}(?<abc>x)/
2043     123axbaxbaxbx456
2044    
2045     /(?:a(?&abc)b){2,}(?<abc>x)/
2046     123axbaxbaxbx456
2047    
2048     /(abc)(?i:(?1))/
2049     defabcabcxyz
2050     DEFabcABCXYZ
2051    
2052     /(abc)(?:(?i)(?1))/
2053     defabcabcxyz
2054     DEFabcABCXYZ
2055    
2056     /^(a)\g-2/
2057    
2058     /^(a)\g/
2059    
2060     /^(a)\g{0}/
2061    
2062     /^(a)\g{3/
2063    
2064     /^(a)\g{4a}/
2065    
2066     /^a.b/<lf>
2067     a\rb
2068     *** Failers
2069     a\nb
2070    
2071     /.+foo/
2072     afoo
2073 ph10 102 ** Failers
2074     \r\nfoo
2075     \nfoo
2076 nigel 93
2077     /.+foo/<crlf>
2078     afoo
2079 ph10 102 \nfoo
2080     ** Failers
2081     \r\nfoo
2082 nigel 93
2083     /.+foo/<any>
2084     afoo
2085 ph10 102 ** Failers
2086     \nfoo
2087     \r\nfoo
2088 nigel 93
2089     /.+foo/s
2090     afoo
2091 ph10 102 \r\nfoo
2092     \nfoo
2093 ph10 131
2094     /^$/mg<any>
2095     abc\r\rxyz
2096     abc\n\rxyz
2097     ** Failers
2098     abc\r\nxyz
2099 nigel 93
2100 ph10 141 /(?m)^$/<any>g+
2101     abc\r\n\r\n
2102    
2103 ph10 143 /(?m)^$|^\r\n/<any>g+
2104     abc\r\n\r\n
2105    
2106     /(?m)$/<any>g+
2107     abc\r\n\r\n
2108    
2109 ph10 149 /abc.$/mgx<anycrlf>
2110 ph10 355 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9
2111 ph10 149
2112 ph10 155 /^X/m
2113     XABC
2114     ** Failers
2115     XABC\B
2116    
2117 ph10 174 /(ab|c)(?-1)/BZ
2118 ph10 166 abc
2119    
2120 ph10 174 /xy(?+1)(abc)/BZ
2121 ph10 166 xyabcabc
2122     ** Failers
2123     xyabc
2124    
2125     /x(?-0)y/
2126    
2127     /x(?-1)y/
2128    
2129     /x(?+0)y/
2130    
2131     /x(?+1)y/
2132    
2133 ph10 174 /^(abc)?(?(-1)X|Y)/BZ
2134 ph10 167 abcX
2135     Y
2136     ** Failers
2137     abcY
2138    
2139 ph10 174 /^((?(+1)X|Y)(abc))+/BZ
2140 ph10 167 YabcXabc
2141     YabcXabcXabc
2142     ** Failers
2143     XabcXabc
2144    
2145 ph10 174 /(?(-1)a)/BZ
2146 ph10 167
2147 ph10 174 /((?(-1)a))/BZ
2148 ph10 167
2149 ph10 174 /((?(-2)a))/BZ
2150 ph10 167
2151 ph10 270 /^(?(+1)X|Y)(.)/BZ
2152     Y!
2153 ph10 167
2154 ph10 171 /(?<A>tom|bon)-\k{A}/
2155     tom-tom
2156     bon-bon
2157     ** Failers
2158     tom-bon
2159    
2160     /\g{A/
2161    
2162 ph10 175 /(?|(abc)|(xyz))/BZ
2163     >abc<
2164     >xyz<
2165    
2166     /(x)(?|(abc)|(xyz))(x)/BZ
2167     xabcx
2168     xxyzx
2169    
2170     /(x)(?|(abc)(pqr)|(xyz))(x)/BZ
2171     xabcpqrx
2172     xxyzx
2173    
2174 ph10 180 /\H++X/BZ
2175     ** Failers
2176     XXXX
2177    
2178     /\H+\hY/BZ
2179     XXXX Y
2180    
2181     /\H+ Y/BZ
2182    
2183     /\h+A/BZ
2184    
2185     /\v*B/BZ
2186    
2187     /\V+\x0a/BZ
2188    
2189     /A+\h/BZ
2190    
2191     / *\H/BZ
2192    
2193     /A*\v/BZ
2194    
2195     /\x0b*\V/BZ
2196    
2197     /\d+\h/BZ
2198    
2199     /\d*\v/BZ
2200    
2201     /S+\h\S+\v/BZ
2202    
2203     /\w{3,}\h\w+\v/BZ
2204    
2205     /\h+\d\h+\w\h+\S\h+\H/BZ
2206    
2207     /\v+\d\v+\w\v+\S\v+\V/BZ
2208    
2209     /\H+\h\H+\d/BZ
2210    
2211     /\V+\v\V+\w/BZ
2212    
2213 ph10 197 /\( (?: [^()]* | (?R) )* \)/x
2214 ph10 666 \J1024(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(00)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
2215 ph10 197
2216 ph10 205 /[\E]AAA/
2217    
2218     /[\Q\E]AAA/
2219    
2220     /[^\E]AAA/
2221    
2222     /[^\Q\E]AAA/
2223    
2224     /[\E^]AAA/
2225    
2226     /[\Q\E^]AAA/
2227    
2228 ph10 210 /A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
2229    
2230     /^a+(*FAIL)/C
2231     aaaaaa
2232    
2233     /a+b?c+(*FAIL)/C
2234     aaabccc
2235    
2236     /a+b?(*PRUNE)c+(*FAIL)/C
2237     aaabccc
2238    
2239     /a+b?(*COMMIT)c+(*FAIL)/C
2240     aaabccc
2241    
2242     /a+b?(*SKIP)c+(*FAIL)/C
2243     aaabcccaaabccc
2244    
2245     /a+b?(*THEN)c+(*FAIL)/C
2246     aaabccc
2247    
2248     /a(*MARK)b/
2249    
2250 ph10 213 /(?i:A{1,}\6666666666)/
2251    
2252     /\g6666666666/
2253    
2254 ph10 640 /[\g6666666666]/BZ
2255 ph10 213
2256 ph10 215 /(?1)\c[/
2257    
2258 ph10 226 /.+A/<crlf>
2259     \r\nA
2260    
2261     /\nA/<crlf>
2262     \r\nA
2263    
2264     /[\r\n]A/<crlf>
2265     \r\nA
2266    
2267     /(\r|\n)A/<crlf>
2268     \r\nA
2269    
2270 ph10 227 /a(*CR)b/
2271    
2272     /(*CR)a.b/
2273     a\nb
2274     ** Failers
2275     a\rb
2276    
2277     /(*CR)a.b/<lf>
2278     a\nb
2279     ** Failers
2280     a\rb
2281    
2282     /(*LF)a.b/<CRLF>
2283     a\rb
2284     ** Failers
2285     a\nb
2286    
2287     /(*CRLF)a.b/
2288     a\rb
2289     a\nb
2290     ** Failers
2291     a\r\nb
2292    
2293     /(*ANYCRLF)a.b/<CR>
2294     ** Failers
2295     a\rb
2296     a\nb
2297     a\r\nb
2298    
2299     /(*ANY)a.b/<cr>
2300     ** Failers
2301     a\rb
2302     a\nb
2303     a\r\nb
2304     a\x85b
2305 ph10 566
2306     /(*ANY).*/g
2307     abc\r\ndef
2308 ph10 227
2309 ph10 566 /(*ANYCRLF).*/g
2310     abc\r\ndef
2311    
2312     /(*CRLF).*/g
2313     abc\r\ndef
2314    
2315 ph10 231 /a\Rb/I<bsr_anycrlf>
2316     a\rb
2317     a\nb
2318     a\r\nb
2319     ** Failers
2320     a\x85b
2321     a\x0bb
2322    
2323     /a\Rb/I<bsr_unicode>
2324     a\rb
2325     a\nb
2326     a\r\nb
2327     a\x85b
2328     a\x0bb
2329     ** Failers
2330     a\x85b\<bsr_anycrlf>
2331     a\x0bb\<bsr_anycrlf>
2332    
2333     /a\R?b/I<bsr_anycrlf>
2334     a\rb
2335     a\nb
2336     a\r\nb
2337     ** Failers
2338     a\x85b
2339     a\x0bb
2340    
2341     /a\R?b/I<bsr_unicode>
2342     a\rb
2343     a\nb
2344     a\r\nb
2345     a\x85b
2346     a\x0bb
2347     ** Failers
2348     a\x85b\<bsr_anycrlf>
2349     a\x0bb\<bsr_anycrlf>
2350    
2351     /a\R{2,4}b/I<bsr_anycrlf>
2352     a\r\n\nb
2353     a\n\r\rb
2354     a\r\n\r\n\r\n\r\nb
2355     ** Failers
2356     a\x85\85b
2357     a\x0b\0bb
2358    
2359     /a\R{2,4}b/I<bsr_unicode>
2360     a\r\rb
2361     a\n\n\nb
2362     a\r\n\n\r\rb
2363     a\x85\85b
2364     a\x0b\0bb
2365     ** Failers
2366     a\r\r\r\r\rb
2367     a\x85\85b\<bsr_anycrlf>
2368     a\x0b\0bb\<bsr_anycrlf>
2369    
2370     /(*BSR_ANYCRLF)a\Rb/I
2371     a\nb
2372     a\rb
2373    
2374     /(*BSR_UNICODE)a\Rb/I
2375     a\x85b
2376    
2377     /(*BSR_ANYCRLF)(*CRLF)a\Rb/I
2378     a\nb
2379     a\rb
2380    
2381     /(*CRLF)(*BSR_UNICODE)a\Rb/I
2382     a\x85b
2383    
2384     /(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
2385    
2386 ph10 268 /(?<a>)(?&)/
2387    
2388     /(?<abc>)(?&a)/
2389    
2390     /(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
2391    
2392 ph10 269 /(?+-a)/
2393    
2394     /(?-+a)/
2395    
2396 ph10 271 /(?(-1))/
2397    
2398     /(?(+10))/
2399    
2400     /(?(10))/
2401    
2402     /(?(+2))()()/
2403    
2404     /(?(2))()()/
2405    
2406 ph10 272 /\k''/
2407    
2408     /\k<>/
2409    
2410     /\k{}/
2411    
2412 ph10 629 /\k/
2413    
2414     /\kabc/
2415    
2416 ph10 272 /(?P=)/
2417    
2418     /(?P>)/
2419    
2420 ph10 282 /(?!\w)(?R)/
2421    
2422     /(?=\w)(?R)/
2423    
2424     /(?<!\w)(?R)/
2425    
2426     /(?<=\w)(?R)/
2427    
2428 ph10 295 /[[:foo:]]/
2429    
2430     /[[:1234:]]/
2431    
2432     /[[:f\oo:]]/
2433    
2434     /[[: :]]/
2435    
2436     /[[:...:]]/
2437    
2438     /[[:l\ower:]]/
2439    
2440     /[[:abc\:]]/
2441    
2442     /[abc[:x\]pqr:]]/
2443    
2444     /[[:a\dz:]]/
2445    
2446 ph10 333 /(^(a|b\g<-1'c))/
2447    
2448 ph10 335 /^(?+1)(?<a>x|y){0}z/
2449     xzxx
2450     yzyy
2451     ** Failers
2452     xxz
2453    
2454 ph10 336 /(\3)(\1)(a)/
2455     cat
2456    
2457     /(\3)(\1)(a)/<JS>
2458     cat
2459    
2460     /TA]/
2461     The ACTA] comes
2462    
2463     /TA]/<JS>
2464     The ACTA] comes
2465    
2466 ph10 340 /(?2)[]a()b](abc)/
2467     abcbabc
2468    
2469     /(?2)[^]a()b](abc)/
2470     abcbabc
2471    
2472     /(?1)[]a()b](abc)/
2473     abcbabc
2474     ** Failers
2475     abcXabc
2476    
2477     /(?1)[^]a()b](abc)/
2478     abcXabc
2479     ** Failers
2480     abcbabc
2481    
2482     /(?2)[]a()b](abc)(xyz)/
2483     xyzbabcxyz
2484    
2485     /(?&N)[]a(?<N>)](?<M>abc)/
2486     abc<abc
2487    
2488     /(?&N)[]a(?<N>)](abc)/
2489     abc<abc
2490    
2491 ph10 341 /a[]b/
2492    
2493     /a[^]b/
2494    
2495     /a[]b/<JS>
2496     ** Failers
2497     ab
2498    
2499     /a[]+b/<JS>
2500     ** Failers
2501     ab
2502    
2503     /a[]*+b/<JS>
2504     ** Failers
2505     ab
2506    
2507     /a[^]b/<JS>
2508     aXb
2509     a\nb
2510     ** Failers
2511     ab
2512    
2513     /a[^]+b/<JS>
2514     aXb
2515     a\nX\nXb
2516     ** Failers
2517     ab
2518    
2519     /a(?!)+b/
2520    
2521     /a(*FAIL)+b/
2522    
2523 ph10 353 /(abc|pqr|123){0}[xyz]/SI
2524    
2525 ph10 381 /(?(?=.*b)b|^)/CI
2526     adc
2527     abc
2528    
2529     /(?(?=b).*b|^d)/I
2530    
2531     /(?(?=.*b).*b|^d)/I
2532    
2533 ph10 389 /xyz/C
2534     xyz
2535     abcxyz
2536     abcxyz\Y
2537     ** Failers
2538     abc
2539     abc\Y
2540     abcxypqr
2541     abcxypqr\Y
2542 ph10 576
2543     /(*NO_START_OPT)xyz/C
2544     abcxyz
2545 ph10 389
2546 ph10 576 /xyz/CY
2547     abcxyz
2548    
2549 ph10 399 /^"((?(?=[a])[^"])|b)*"$/C
2550     "ab"
2551    
2552     /^"((?(?=[a])[^"])|b)*"$/
2553     "ab"
2554    
2555 ph10 408 /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
2556     XYabcdY
2557    
2558     /^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
2559     XYabcdY
2560    
2561 ph10 426 /Xa{2,4}b/
2562     X\P
2563     Xa\P
2564     Xaa\P
2565     Xaaa\P
2566     Xaaaa\P
2567    
2568     /Xa{2,4}?b/
2569     X\P
2570     Xa\P
2571     Xaa\P
2572     Xaaa\P
2573     Xaaaa\P
2574    
2575     /Xa{2,4}+b/
2576     X\P
2577     Xa\P
2578     Xaa\P
2579     Xaaa\P
2580     Xaaaa\P
2581    
2582     /X\d{2,4}b/
2583     X\P
2584     X3\P
2585     X33\P
2586     X333\P
2587     X3333\P
2588    
2589     /X\d{2,4}?b/
2590     X\P
2591     X3\P
2592     X33\P
2593     X333\P
2594     X3333\P
2595    
2596     /X\d{2,4}+b/
2597     X\P
2598     X3\P
2599     X33\P
2600     X333\P
2601     X3333\P
2602    
2603     /X\D{2,4}b/
2604     X\P
2605     Xa\P
2606     Xaa\P
2607     Xaaa\P
2608     Xaaaa\P
2609    
2610     /X\D{2,4}?b/
2611     X\P
2612     Xa\P
2613     Xaa\P
2614     Xaaa\P
2615     Xaaaa\P
2616    
2617     /X\D{2,4}+b/
2618     X\P
2619     Xa\P
2620     Xaa\P
2621     Xaaa\P
2622     Xaaaa\P
2623    
2624     /X[abc]{2,4}b/
2625     X\P
2626     Xa\P
2627     Xaa\P
2628     Xaaa\P
2629     Xaaaa\P
2630    
2631     /X[abc]{2,4}?b/
2632     X\P
2633     Xa\P
2634     Xaa\P
2635     Xaaa\P
2636     Xaaaa\P
2637    
2638     /X[abc]{2,4}+b/
2639     X\P
2640     Xa\P
2641     Xaa\P
2642     Xaaa\P
2643     Xaaaa\P
2644    
2645     /X[^a]{2,4}b/
2646     X\P
2647     Xz\P
2648     Xzz\P
2649     Xzzz\P
2650     Xzzzz\P
2651    
2652     /X[^a]{2,4}?b/
2653     X\P
2654     Xz\P
2655     Xzz\P
2656     Xzzz\P
2657     Xzzzz\P
2658    
2659     /X[^a]{2,4}+b/
2660     X\P
2661     Xz\P
2662     Xzz\P
2663     Xzzz\P
2664     Xzzzz\P
2665    
2666     /(Y)X\1{2,4}b/
2667     YX\P
2668     YXY\P
2669     YXYY\P
2670     YXYYY\P
2671     YXYYYY\P
2672    
2673     /(Y)X\1{2,4}?b/
2674     YX\P
2675     YXY\P
2676     YXYY\P
2677     YXYYY\P
2678     YXYYYY\P
2679    
2680     /(Y)X\1{2,4}+b/
2681     YX\P
2682     YXY\P
2683     YXYY\P
2684     YXYYY\P
2685     YXYYYY\P
2686    
2687     /\++\KZ|\d+X|9+Y/
2688     ++++123999\P
2689     ++++123999Y\P
2690     ++++Z1234\P
2691    
2692     /Z(*F)/
2693     Z\P
2694     ZA\P
2695    
2696     /Z(?!)/
2697     Z\P
2698     ZA\P
2699    
2700 ph10 427 /dog(sbody)?/
2701     dogs\P
2702     dogs\P\P
2703    
2704 ph10 428 /dog(sbody)??/
2705     dogs\P
2706     dogs\P\P
2707    
2708 ph10 427 /dog|dogsbody/
2709     dogs\P
2710     dogs\P\P
2711    
2712 ph10 428 /dogsbody|dog/
2713     dogs\P
2714     dogs\P\P
2715    
2716     /\bthe cat\b/
2717     the cat\P
2718     the cat\P\P
2719    
2720     /abc/
2721     abc\P
2722     abc\P\P
2723 ph10 432
2724 ph10 435 /abc\K123/
2725     xyzabc123pqr
2726     xyzabc12\P
2727     xyzabc12\P\P
2728    
2729     /(?<=abc)123/
2730     xyzabc123pqr
2731     xyzabc12\P
2732     xyzabc12\P\P
2733    
2734     /\babc\b/
2735     +++abc+++
2736     +++ab\P
2737     +++ab\P\P
2738    
2739 ph10 438 /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
2740    
2741     /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
2742    
2743 ph10 449 /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
2744    
2745 ph10 442 /abc\K/+
2746     abcdef
2747     abcdef\N\N
2748     xyzabcdef\N\N
2749     ** Failers
2750     abcdef\N
2751     xyzabcdef\N
2752    
2753     /^(?:(?=abc)|abc\K)/+
2754     abcdef
2755     abcdef\N\N
2756     ** Failers
2757     abcdef\N
2758    
2759     /a?b?/+
2760     xyz
2761     xyzabc
2762     xyzabc\N
2763     xyzabc\N\N
2764     xyz\N\N
2765     ** Failers
2766     xyz\N
2767    
2768     /^a?b?/+
2769     xyz
2770     xyzabc
2771     ** Failers
2772     xyzabc\N
2773     xyzabc\N\N
2774     xyz\N\N
2775     xyz\N
2776    
2777 ph10 448 /^(?<name>a|b\g<name>c)/
2778     aaaa
2779     bacxxx
2780     bbaccxxx
2781     bbbacccxx
2782    
2783     /^(?<name>a|b\g'name'c)/
2784     aaaa
2785     bacxxx
2786     bbaccxxx
2787     bbbacccxx
2788    
2789     /^(a|b\g<1>c)/
2790     aaaa
2791     bacxxx
2792     bbaccxxx
2793     bbbacccxx
2794    
2795     /^(a|b\g'1'c)/
2796     aaaa
2797     bacxxx
2798     bbaccxxx
2799     bbbacccxx
2800    
2801     /^(a|b\g'-1'c)/
2802     aaaa
2803     bacxxx
2804     bbaccxxx
2805     bbbacccxx
2806    
2807     /(^(a|b\g<-1>c))/
2808     aaaa
2809     bacxxx
2810     bbaccxxx
2811     bbbacccxx
2812    
2813     /(?-i:\g<name>)(?i:(?<name>a))/
2814     XaaX
2815     XAAX
2816    
2817     /(?i:\g<name>)(?-i:(?<name>a))/
2818     XaaX
2819     ** Failers
2820     XAAX
2821    
2822     /(?-i:\g<+1>)(?i:(a))/
2823     XaaX
2824     XAAX
2825    
2826     /(?=(?<regex>(?#simplesyntax)\$(?<name>[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?<index>[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g<name>)\]|->\g<name>(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complexsyntax)\{(?<complex>\$(?<segment>\g<name>(\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/
2827    
2828     /(?<n>a|b|c)\g<n>*/
2829     abc
2830     accccbbb
2831    
2832     /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
2833     XYabcdY
2834    
2835 ph10 454 /(?<=b(?1)|zzz)(a)/
2836     xbaax
2837     xzzzax
2838    
2839     /(a)(?<=b\1)/
2840    
2841     /(a)(?<=b+(?1))/
2842    
2843     /(a+)(?<=b(?1))/
2844    
2845     /(a(?<=b(?1)))/
2846    
2847     /(?<=b(?1))xyz/
2848    
2849     /(?<=b(?1))xyz(b+)pqrstuvew/
2850    
2851 ph10 455 /(a|bc)\1/SI
2852    
2853     /(a|bc)\1{2,3}/SI
2854    
2855     /(a|bc)(?1)/SI
2856    
2857     /(a|b\1)(a|b\1)/SI
2858    
2859     /(a|b\1){2}/SI
2860    
2861     /(a|bbbb\1)(a|bbbb\1)/SI
2862    
2863     /(a|bbbb\1){2}/SI
2864    
2865     /^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]/SI
2866    
2867     /<tr([\w\W\s\d][^<>]{0,})><TD([\w\W\s\d][^<>]{0,})>([\d]{0,}\.)(.*)((<BR>([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><TD([\w\W\s\d][^<>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>/isIS
2868    
2869     "(?>.*/)foo"SI
2870    
2871     /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /xSI
2872    
2873     /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
2874    
2875     /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
2876    
2877     /<a[\s]+href[\s]*=[\s]* # find <a href=
2878     ([\"\'])? # find single or double quote
2879     (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
2880     # quote, otherwise match up to next space
2881     /isxSI
2882    
2883     /^(?!:) # colon disallowed at start
2884     (?: # start of item
2885     (?: [0-9a-f]{1,4} | # 1-4 hex digits or
2886     (?(1)0 | () ) ) # if null previously matched, fail; else null
2887     : # followed by colon
2888     ){1,7} # end item; 1-7 of them required
2889     [0-9a-f]{1,4} $ # final hex number at end of string
2890     (?(1)|.) # check that there was an empty component
2891     /xiIS
2892    
2893 ph10 457 /(?|(?<a>A)|(?<a>B))/I
2894     AB\Ca
2895     BA\Ca
2896    
2897     /(?|(?<a>A)|(?<b>B))/
2898    
2899 ph10 459 /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
2900     b(?<quote> (?<apostrophe>')|(?<realquote>")) )
2901     (?('quote')[a-z]+|[0-9]+)/JIx
2902     a"aaaaa
2903     b"aaaaa
2904     ** Failers
2905     b"11111
2906     a"11111
2907    
2908 ph10 461 /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
2909 ph10 459 abcdX
2910     eX
2911     ** Failers
2912     abcdY
2913     ey
2914    
2915 ph10 461 /(?<A>a) (b)(c) (?<A>d (?(R&A)$ | (?4)) )/JDZx
2916 ph10 459 abcdd
2917     ** Failers
2918     abcdde
2919    
2920 ph10 462 /abcd*/
2921     xxxxabcd\P
2922     xxxxabcd\P\P
2923    
2924     /abcd*/i
2925     xxxxabcd\P
2926     xxxxabcd\P\P
2927     XXXXABCD\P
2928     XXXXABCD\P\P
2929    
2930     /abc\d*/
2931     xxxxabc1\P
2932     xxxxabc1\P\P
2933    
2934     /(a)bc\1*/
2935     xxxxabca\P
2936     xxxxabca\P\P
2937    
2938     /abc[de]*/
2939     xxxxabcde\P
2940     xxxxabcde\P\P
2941    
2942 ph10 559 /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
2943     broken and not behaving as specified in that it *does* bumpalong after
2944     hitting (*COMMIT). --/
2945 ph10 464
2946     /(?1)(A(*COMMIT)|B)D/
2947     ABD
2948     XABD
2949     BAD
2950     ABXABD
2951     ** Failers
2952     ABX
2953     BAXBAD
2954    
2955 ph10 467 /(\3)(\1)(a)/<JS>
2956     cat
2957    
2958     /(\3)(\1)(a)/SI<JS>
2959     cat
2960    
2961     /(\3)(\1)(a)/SI
2962     cat
2963    
2964 ph10 471 /i(?(DEFINE)(?<s>a))/SI
2965     i
2966    
2967     /()i(?(1)a)/SI
2968     ia
2969    
2970 ph10 472 /(?i)a(?-i)b|c/BZ
2971     XabX
2972     XAbX
2973     CcC
2974     ** Failers
2975     XABX
2976    
2977     /(?i)a(?s)b|c/BZ
2978    
2979     /(?i)a(?s-i)b|c/BZ
2980    
2981 ph10 488 /^(ab(c\1)d|x){2}$/BZ
2982     xabcxd
2983 ph10 496
2984     /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
2985 ph10 488
2986 ph10 496 /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
2987    
2988 ph10 559 / -- The first four of these are not in the Perl >= 5.10 test because Perl
2989 ph10 500 documents that the use of \K in assertions is "not well defined". The
2990     last is here because Perl gives the match as "b" rather than "ab". I
2991     believe this to be a Perl bug. --/
2992    
2993     /(?=a\Kb)ab/
2994     ab
2995    
2996     /(?!a\Kb)ac/
2997     ac
2998    
2999     /^abc(?<=b\Kc)d/
3000     abcd
3001    
3002     /^abc(?<!b\Kq)d/
3003     abcd
3004    
3005     /(?>a\Kb)z|(ab)/
3006     ab
3007    
3008     /----------------------/
3009    
3010 ph10 504 /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
3011    
3012 ph10 510 /abc(*MARK:)pqr/
3013    
3014     /abc(*:)pqr/
3015    
3016     /abc(*FAIL:123)xyz/
3017    
3018     /--- This should, and does, fail. In Perl, it does not, which I think is a
3019     bug because replacing the B in the pattern by (B|D) does make it fail. ---/
3020    
3021     /A(*COMMIT)B/+K
3022     ACABX
3023    
3024     /--- These should be different, but in Perl 5.11 are not, which I think
3025     is a bug in Perl. ---/
3026    
3027     /A(*THEN)B|A(*THEN)C/K
3028     AC
3029    
3030     /A(*PRUNE)B|A(*PRUNE)C/K
3031     AC
3032    
3033     /--- This should fail; the SKIP advances by one, but when we get to AC, the
3034 ph10 836 PRUNE kills it. Perl behaves differently. ---/
3035 ph10 510
3036     /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
3037     AAAC
3038    
3039 ph10 836 /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
3040     though PCRE does. ---/
3041 ph10 510
3042     /^A(*:A)B|^X(*:A)Y/K
3043     ** Failers
3044     XAQQ
3045    
3046     /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
3047     optimizations defeat this. So does the PCRE optimization unless we disable it
3048     with \Y. ---/
3049    
3050     /(*COMMIT)ABC/
3051     ABCDEFG
3052     ** Failers
3053     DEFGABC\Y
3054    
3055     /^(ab (c+(*THEN)cd) | xyz)/x
3056     abcccd
3057    
3058     /^(ab (c+(*PRUNE)cd) | xyz)/x
3059     abcccd
3060    
3061     /^(ab (c+(*FAIL)cd) | xyz)/x
3062     abcccd
3063 ph10 511
3064     /--- Perl 5.11 gets some of these wrong ---/
3065 ph10 510
3066 ph10 511 /(?>.(*ACCEPT))*?5/
3067     abcde
3068    
3069     /(.(*ACCEPT))*?5/
3070     abcde
3071    
3072     /(.(*ACCEPT))5/
3073     abcde
3074    
3075     /(.(*ACCEPT))*5/
3076     abcde
3077    
3078 ph10 514 /A\NB./BZ
3079 ph10 550 ACBD
3080     *** Failers
3081     A\nB
3082     ACB\n
3083 ph10 514
3084     /A\NB./sBZ
3085 ph10 550 ACBD
3086     ACB\n
3087     *** Failers
3088     A\nB
3089 ph10 514
3090     /A\NB/<crlf>
3091 ph10 550 A\nB
3092     A\rB
3093     ** Failers
3094     A\r\nB
3095 ph10 514
3096 ph10 528 /\R+b/BZ
3097    
3098     /\R+\n/BZ
3099    
3100     /\R+\d/BZ
3101    
3102     /\d*\R/BZ
3103    
3104     /\s*\R/BZ
3105    
3106 ph10 550 /-- Perl treats this one differently, not failing the second string. I believe
3107     that is a bug in Perl. --/
3108    
3109     /^((abc|abcx)(*THEN)y|abcd)/
3110     abcd
3111     *** Failers
3112     abcxy
3113    
3114 ph10 553 /(?<=abc)def/
3115     abc\P\P
3116    
3117     /abc$/
3118     abc
3119     abc\P
3120     abc\P\P
3121    
3122     /abc$/m
3123     abc
3124     abc\n
3125     abc\P\P
3126     abc\n\P\P
3127     abc\P
3128     abc\n\P
3129    
3130     /abc\z/
3131     abc
3132     abc\P
3133     abc\P\P
3134    
3135     /abc\Z/
3136     abc
3137     abc\P
3138     abc\P\P
3139    
3140     /abc\b/
3141     abc
3142     abc\P
3143     abc\P\P
3144    
3145     /abc\B/
3146     abc
3147     abc\P
3148     abc\P\P
3149    
3150 ph10 567 /.+/
3151     abc\>0
3152     abc\>1
3153     abc\>2
3154     abc\>3
3155     abc\>4
3156     abc\>-4
3157    
3158 ph10 574 /^\cģ/
3159    
3160 ph10 578 /(?P<abn>(?P=abn)xxx)/BZ
3161    
3162     /(a\1z)/BZ
3163    
3164     /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
3165    
3166     /(?P<abn>(?P=axn)xxx)/BZ
3167    
3168     /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
3169    
3170 ph10 600 /-- These tests are here because Perl gets the first one wrong. --/
3171    
3172     /(\R*)(.)/s
3173     \r\n
3174     \r\r\n\n\r
3175     \r\r\n\n\r\n
3176    
3177     /(\R)*(.)/s
3178     \r\n
3179     \r\r\n\n\r
3180     \r\r\n\n\r\n
3181    
3182     /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
3183     \r\n
3184     \r\r\n\n\r
3185     \r\r\n\n\r\n
3186    
3187     /-- --/
3188    
3189 ph10 602 /^abc$/BZ
3190    
3191     /^abc$/BZm
3192    
3193 ph10 604 /^(a)*+(\w)/S
3194     aaaaX
3195     ** Failers
3196     aaaa
3197    
3198     /^(?:a)*+(\w)/S
3199     aaaaX
3200     ** Failers
3201     aaaa
3202    
3203     /(a)++1234/SDZ
3204    
3205     /([abc])++1234/SI
3206    
3207     /(?<=(abc)+)X/
3208    
3209     /(^ab)/I
3210    
3211     /(^ab)++/I
3212    
3213     /(^ab|^)+/I
3214    
3215     /(^ab|^)++/I
3216    
3217     /(?:^ab)/I
3218    
3219     /(?:^ab)++/I
3220    
3221     /(?:^ab|^)+/I
3222    
3223     /(?:^ab|^)++/I
3224    
3225     /(.*ab)/I
3226    
3227     /(.*ab)++/I
3228    
3229     /(.*ab|.*)+/I
3230    
3231     /(.*ab|.*)++/I
3232    
3233     /(?:.*ab)/I
3234    
3235     /(?:.*ab)++/I
3236    
3237     /(?:.*ab|.*)+/I
3238    
3239     /(?:.*ab|.*)++/I
3240    
3241     /(?=a)[bcd]/I
3242    
3243     /((?=a))[bcd]/I
3244    
3245     /((?=a))+[bcd]/I
3246    
3247     /((?=a))++[bcd]/I
3248    
3249     /(?=a+)[bcd]/iI
3250    
3251     /(?=a+?)[bcd]/iI
3252    
3253     /(?=a++)[bcd]/iI
3254    
3255     /(?=a{3})[bcd]/iI
3256    
3257     /(abc)\1+/S
3258    
3259 ph10 608 /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
3260    
3261     /(?1)(?:(b(*ACCEPT))){0}/
3262     b
3263    
3264     /(?1)(?:(b(*ACCEPT))){0}c/
3265     bc
3266     ** Failers
3267     b
3268    
3269     /(?1)(?:((*ACCEPT))){0}c/
3270     c
3271     c\N
3272    
3273 ph10 609 /^.*?(?(?=a)a|b(*THEN)c)/
3274     ba
3275    
3276     /^.*?(?(?=a)a|bc)/
3277     ba
3278    
3279 ph10 699 /^.*?(?(?=a)a(*THEN)b|c)/
3280     ac
3281    
3282     /^.*?(?(?=a)a(*THEN)b)c/
3283     ac
3284    
3285     /^.*?(a(*THEN)b)c/
3286     aabc
3287 ph10 713
3288     /^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
3289     aabc
3290 ph10 699
3291     /^.*?(a(*THEN)b|z)c/
3292     aabc
3293    
3294     /^.*?(z|a(*THEN)b)c/
3295     aabc
3296    
3297 ph10 608 /-- --/
3298    
3299 ph10 612 /-- These studied versions are here because they are not Perl-compatible; the
3300     studying means the mark is not seen. --/
3301    
3302     /(*MARK:A)(*SKIP:B)(C|X)/KS
3303     C
3304     D
3305    
3306     /(*:A)A+(*SKIP:A)(B|Z)/KS
3307     AAAC
3308    
3309     /-- --/
3310    
3311 ph10 613 "(?=a*(*ACCEPT)b)c"
3312     c
3313     c\N
3314    
3315     /(?1)c(?(DEFINE)((*ACCEPT)b))/
3316     c
3317     c\N
3318    
3319     /(?>(*ACCEPT)b)c/
3320     c
3321     c\N
3322    
3323 ph10 618 /(?:(?>(a)))+a%/++
3324     %aa%
3325    
3326 ph10 666 /(a)b|ac/++SS
3327 ph10 618 ac\O3
3328 ph10 666
3329     /(a)(b)x|abc/++
3330     abc\O6
3331 ph10 618
3332 ph10 666 /(a)bc|(a)(b)\2/
3333     \O3abc
3334     \O4abc
3335    
3336 ph10 620 /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
3337    
3338     /(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
3339    
3340     /(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
3341    
3342     /(abc)(?1)/SI
3343    
3344 ph10 621 /^(?>a)++/
3345     aa\M
3346     aaaaaaaaa\M
3347    
3348     /(a)(?1)++/
3349     aa\M
3350     aaaaaaaaa\M
3351    
3352 ph10 666 /(?:(foo)|(bar)|(baz))X/SS=
3353 ph10 626 bazfooX
3354     foobazbarX
3355     barfooX
3356     bazX
3357     foobarbazX
3358     bazfooX\O0
3359     bazfooX\O2
3360     bazfooX\O4
3361     bazfooX\O6
3362     bazfooX\O8
3363     bazfooX\O10
3364    
3365 ph10 637 /(?=abc){3}abc/BZ
3366    
3367     /(?=abc)+abc/BZ
3368    
3369     /(?=abc)++abc/BZ
3370    
3371     /(?=abc){0}xyz/BZ
3372    
3373     /(?=(a))?./BZ
3374    
3375     /(?=(a))??./BZ
3376    
3377     /^(?=(a)){0}b(?1)/BZ
3378    
3379     /(?(DEFINE)(a))?b(?1)/BZ
3380    
3381     /^(?=(?1))?[az]([abc])d/BZ
3382    
3383     /^(?!a){0}\w+/BZ
3384    
3385     /(?<=(abc))?xyz/BZ
3386    
3387 ph10 666 /[:a[:abc]b:]/BZ
3388 ph10 640
3389 ph10 666 /((?2))((?1))/SS
3390 ph10 642 abc
3391    
3392 zherczeg 741 /((?(R2)a+|(?1)b))/SS
3393 ph10 642 aaaabcde
3394    
3395 zherczeg 741 /(?(R)a*(?1)|((?R))b)/SS
3396 ph10 642 aaaabcde
3397    
3398     /(a+|(?R)b)/
3399    
3400 ph10 647 /^(a(*:A)(d|e(*:B))z|aeq)/C
3401     adz
3402     aez
3403     aeqwerty
3404    
3405 ph10 648 /.(*F)/
3406     \P\Pabc
3407    
3408 ph10 657 /\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
3409    
3410     /\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
3411    
3412 ph10 697 /a(*SKIP)c|b(*ACCEPT)|/+SI
3413     a
3414    
3415     /a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
3416     ax
3417    
3418     'a*(*ACCEPT)b'+
3419     \N\N
3420     abc\N\N
3421     bbb\N\N
3422    
3423 ph10 701 /(*ACCEPT)a/+I
3424     bax
3425    
3426     /z(*ACCEPT)a/+I
3427     baxzbx
3428    
3429 ph10 702 /a(?:.)*?a/ims
3430     \Mabbbbbbbbbbbbbbbbbbbbba
3431 ph10 716
3432     /a(?:.(*THEN))*?a/ims
3433     \Mabbbbbbbbbbbbbbbbbbbbba
3434 ph10 702
3435 ph10 716 /a(?:.(*THEN:ABC))*?a/ims
3436     \Mabbbbbbbbbbbbbbbbbbbbba
3437    
3438     /-- These tests are in agreement with development Perl 5.015, which has fixed
3439     some things, but they don't all work with 5.012, so they aren't in the
3440     Perl-compatible tests. Those after the first come from Perl's own test
3441     files. --/
3442    
3443     /^((yes|no)(*THEN)(*F))?/
3444     yes
3445    
3446     /(A (.*) C? (*THEN) | A D) (*FAIL)/x
3447     AbcdCBefgBhiBqz
3448    
3449     /(A (.*) C? (*THEN) | A D) z/x
3450     AbcdCBefgBhiBqz
3451    
3452     /(A (.*) C? (*THEN) | A D) \s* (*FAIL)/x
3453     AbcdCBefgBhiBqz
3454    
3455     /(A (.*) C? (*THEN) | A D) \s* z/x
3456     AbcdCBefgBhiBqz
3457    
3458     /(A (.*) (?:C|) (*THEN) | A D) (*FAIL)/x
3459     AbcdCBefgBhiBqz
3460    
3461     /(A (.*) (?:C|) (*THEN) | A D) z/x
3462     AbcdCBefgBhiBqz
3463    
3464     /(A (.*) C{0,6} (*THEN) | A D) (*FAIL)/x
3465     AbcdCBefgBhiBqz
3466    
3467     /(A (.*) C{0,6} (*THEN) | A D) z/x
3468     AbcdCBefgBhiBqz
3469    
3470     /(A (.*) (CE){0,6} (*THEN) | A D) (*FAIL)/x
3471     AbcdCEBefgBhiBqz
3472    
3473     /(A (.*) (CE){0,6} (*THEN) | A D) z/x
3474     AbcdCEBefgBhiBqz
3475    
3476     /(A (.*) (CE*){0,6} (*THEN) | A D) (*FAIL)/x
3477     AbcdCBefgBhiBqz
3478    
3479     /(A (.*) (CE*){0,6} (*THEN) | A D) z/x
3480     AbcdCBefgBhiBqz
3481    
3482     /-----------------------------------------------/
3483    
3484 ph10 725 /^(?>a+)(?>(z+))\w/BZ
3485     aaaazzzzb
3486     ** Failers
3487     aazz
3488    
3489     /(.)(\1|a(?2))/
3490     bab
3491    
3492     /\1|(.)(?R)\1/
3493     cbbbc
3494    
3495     /(.)((?(1)c|a)|a(?2))/
3496     baa
3497    
3498     /(?P<abn>(?P=abn)xxx)/BZ
3499    
3500     /(a\1z)/BZ
3501    
3502     /^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
3503     \Maabbccddee
3504    
3505     /^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
3506     \Maabbccddee
3507    
3508     /^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
3509     \Maabbccddee
3510    
3511 zherczeg 744 /^a\x41z/<JS>
3512     aAz
3513     *** Failers
3514     ax41z
3515    
3516     /^a[m\x41]z/<JS>
3517     aAz
3518    
3519     /^a\x1z/<JS>
3520     ax1z
3521    
3522     /^a\u0041z/<JS>
3523     aAz
3524     *** Failers
3525     au0041z
3526    
3527     /^a[m\u0041]z/<JS>
3528     aAz
3529    
3530     /^a\u041z/<JS>
3531     au041z
3532     *** Failers
3533     aAz
3534    
3535     /^a\U0041z/<JS>
3536     aU0041z
3537     *** Failers
3538     aAz
3539    
3540 ph10 749 /(?(?=c)c|d)++Y/BZ
3541    
3542     /(?(?=c)c|d)*+Y/BZ
3543    
3544 ph10 836 /a[\NB]c/
3545     aNc
3546    
3547     /a[B-\Nc]/
3548 ph10 758
3549 ph10 836 /(a)(?2){0,1999}?(b)/
3550    
3551     /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
3552    
3553     /--- This test, with something more complicated than individual letters, causes
3554     different behaviour in Perl. Perhaps it disables some optimization; no tag is
3555     passed back for the failures, whereas in PCRE there is a tag. ---/
3556    
3557     /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
3558     AABC
3559     XXYZ
3560     ** Failers
3561     XAQQ
3562     XAQQXZZ
3563     AXQQQ
3564     AXXQQQ
3565    
3566     /-- Perl doesn't give marks for these, though it does if the alternatives are
3567     replaced by single letters. --/
3568    
3569     /(b|q)(*:m)f|a(*:n)w/K
3570     aw
3571     ** Failers
3572     abc
3573    
3574     /(q|b)(*:m)f|a(*:n)w/K
3575     aw
3576     ** Failers
3577     abc
3578    
3579     /-- After a partial match, the behaviour is as for a failure. --/
3580    
3581     /^a(*:X)bcde/K
3582     abc\P
3583 ph10 882
3584     /-- These are here because Perl doesn't return a mark, except for the first --/
3585 ph10 836
3586 ph10 882 /(?=(*:x))(q|)/K+
3587     abc
3588    
3589     /(?=(*:x))((*:y)q|)/K+
3590     abc
3591    
3592     /(?=(*:x))(?:(*:y)q|)/K+
3593     abc
3594    
3595     /(?=(*:x))(?>(*:y)q|)/K+
3596     abc
3597    
3598 ph10 450 /-- End of testinput2 --/

Properties

Name Value
svn:keywords "Author Date Id Revision Url"

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12