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

Legend:
Removed from v.79  
changed lines
  Added in v.472

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12