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

Diff of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.91  
changed lines
  Added in v.559

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12