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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 162 - (hide annotations) (download)
Thu May 3 10:47:48 2007 UTC (7 years, 7 months ago) by ph10
File size: 36103 byte(s)
Correct tests for link sizes 3 and 4

1 nigel 93 /(a)b|/I
2 nigel 41
3 nigel 93 /abc/I
4 nigel 41 abc
5     defabc
6     \Aabc
7     *** Failers
8     \Adefabc
9     ABC
10    
11 nigel 93 /^abc/I
12 nigel 41 abc
13     \Aabc
14     *** Failers
15     defabc
16     \Adefabc
17    
18 nigel 93 /a+bc/I
19 nigel 41
20 nigel 93 /a*bc/I
21 nigel 41
22 nigel 93 /a{3}bc/I
23 nigel 41
24 nigel 93 /(abc|a+z)/I
25 nigel 41
26 nigel 93 /^abc$/I
27 nigel 41 abc
28     *** Failers
29     def\nabc
30    
31 nigel 93 /ab\hdef/X
32 nigel 41
33 nigel 93 /(?X)ab\hdef/X
34 nigel 41
35     /x{5,4}/
36    
37     /z{65536}/
38    
39     /[abcd/
40    
41 nigel 63 /(?X)[\B]/
42 nigel 41
43     /[z-a]/
44    
45     /^*/
46    
47     /(abc/
48    
49     /(?# abc/
50    
51     /(?z)abc/
52    
53 nigel 93 /.*b/I
54 nigel 41
55 nigel 93 /.*?b/I
56 nigel 41
57 nigel 93 /cat|dog|elephant/I
58 nigel 41 this sentence eventually mentions a cat
59     this sentences rambles on and on for a while and then reaches elephant
60    
61 nigel 93 /cat|dog|elephant/IS
62 nigel 41 this sentence eventually mentions a cat
63     this sentences rambles on and on for a while and then reaches elephant
64    
65 nigel 93 /cat|dog|elephant/IiS
66 nigel 41 this sentence eventually mentions a CAT cat
67     this sentences rambles on and on for a while to elephant ElePhant
68    
69 nigel 93 /a|[bcd]/IS
70 nigel 41
71 nigel 93 /(a|[^\dZ])/IS
72 nigel 41
73 nigel 93 /(a|b)*[\s]/IS
74 nigel 41
75     /(ab\2)/
76    
77     /{4,5}abc/
78    
79 nigel 93 /(a)(b)(c)\2/I
80 nigel 41 abcb
81     \O0abcb
82     \O3abcb
83     \O6abcb
84     \O9abcb
85 ph10 102 \O12abcb
86 nigel 41
87 nigel 93 /(a)bc|(a)(b)\2/I
88 nigel 41 abc
89     \O0abc
90     \O3abc
91     \O6abc
92     aba
93     \O0aba
94     \O3aba
95     \O6aba
96     \O9aba
97     \O12aba
98    
99 nigel 93 /abc$/IE
100 nigel 41 abc
101     *** Failers
102     abc\n
103     abc\ndef
104    
105     /(a)(b)(c)(d)(e)\6/
106    
107 nigel 93 /the quick brown fox/I
108 nigel 41 the quick brown fox
109     this is a line with the quick brown fox
110    
111 nigel 93 /the quick brown fox/IA
112 nigel 41 the quick brown fox
113     *** Failers
114     this is a line with the quick brown fox
115    
116     /ab(?z)cd/
117    
118 nigel 93 /^abc|def/I
119 nigel 41 abcdef
120     abcdef\B
121    
122 nigel 93 /.*((abc)$|(def))/I
123 nigel 41 defabc
124     \Zdefabc
125    
126 nigel 93 /abc/IP
127 nigel 41 abc
128     *** Failers
129 ph10 102
130 nigel 93 /^abc|def/IP
131 nigel 41 abcdef
132     abcdef\B
133    
134 nigel 93 /.*((abc)$|(def))/IP
135 nigel 41 defabc
136     \Zdefabc
137 ph10 102
138 nigel 93 /the quick brown fox/IP
139 nigel 41 the quick brown fox
140 ph10 102 *** Failers
141     The Quick Brown Fox
142 nigel 41
143 nigel 93 /the quick brown fox/IPi
144 nigel 41 the quick brown fox
145 ph10 102 The Quick Brown Fox
146 nigel 41
147 nigel 93 /abc.def/IP
148 nigel 41 *** Failers
149     abc\ndef
150 ph10 102
151 nigel 93 /abc$/IP
152 nigel 41 abc
153 ph10 102 abc\n
154 nigel 41
155 nigel 93 /(abc)\2/IP
156 nigel 41
157 nigel 93 /(abc\1)/IP
158 nigel 41 abc
159    
160     /)/
161    
162     /a[]b/
163    
164 nigel 93 /[^aeiou ]{3,}/I
165 ph10 102 co-processors, and for
166    
167 nigel 93 /<.*>/I
168 nigel 41 abc<def>ghi<klm>nop
169    
170 nigel 93 /<.*?>/I
171 nigel 41 abc<def>ghi<klm>nop
172    
173 nigel 93 /<.*>/IU
174 nigel 41 abc<def>ghi<klm>nop
175 ph10 102
176 nigel 93 /(?U)<.*>/I
177 nigel 41 abc<def>ghi<klm>nop
178    
179 nigel 93 /<.*?>/IU
180 nigel 41 abc<def>ghi<klm>nop
181 ph10 102
182 nigel 93 /={3,}/IU
183 nigel 41 abc========def
184 ph10 102
185 nigel 93 /(?U)={3,}?/I
186 nigel 41 abc========def
187 ph10 102
188 nigel 93 /(?<!bar|cattle)foo/I
189 nigel 41 foo
190 ph10 102 catfoo
191 nigel 41 *** Failers
192     the barfoo
193 ph10 102 and cattlefoo
194 nigel 41
195     /(?<=a+)b/
196    
197     /(?<=aaa|b{0,3})b/
198    
199     /(?<!(foo)a\1)bar/
200    
201 nigel 93 /(?i)abc/I
202 nigel 41
203 nigel 93 /(a|(?m)a)/I
204 nigel 41
205 nigel 93 /(?i)^1234/I
206 nigel 41
207 nigel 93 /(^b|(?i)^d)/I
208 nigel 41
209 nigel 93 /(?s).*/I
210 nigel 41
211 nigel 93 /[abcd]/IS
212 nigel 41
213 nigel 93 /(?i)[abcd]/IS
214 nigel 41
215 nigel 93 /(?m)[xy]|(b|c)/IS
216 nigel 41
217 nigel 93 /(^a|^b)/Im
218 nigel 41
219 nigel 93 /(?i)(^a|^b)/Im
220 nigel 41
221     /(a)(?(1)a|b|c)/
222    
223     /(?(?=a)a|b|c)/
224    
225     /(?(1a)/
226    
227 nigel 93 /(?(1a))/
228    
229 nigel 41 /(?(?i))/
230    
231     /(?(abc))/
232    
233     /(?(?<ab))/
234    
235 nigel 93 /((?s)blah)\s+\1/I
236 nigel 41
237 nigel 93 /((?i)blah)\s+\1/I
238 nigel 41
239 ph10 161 /((?i)b)/IDZS
240 nigel 41
241 nigel 93 /(a*b|(?i:c*(?-i)d))/IS
242 nigel 41
243 nigel 93 /a$/I
244 nigel 41 a
245     a\n
246 ph10 102 *** Failers
247 nigel 41 \Za
248 ph10 102 \Za\n
249 nigel 41
250 nigel 93 /a$/Im
251 nigel 41 a
252     a\n
253 ph10 102 \Za\n
254     *** Failers
255 nigel 41 \Za
256 ph10 102
257 nigel 93 /\Aabc/Im
258 nigel 41
259 ph10 102 /^abc/Im
260 nigel 41
261 nigel 93 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/I
262 nigel 41 aaaaabbbbbcccccdef
263    
264 nigel 93 /(?<=foo)[ab]/IS
265 nigel 41
266 nigel 93 /(?<!foo)(alpha|omega)/IS
267 nigel 41
268 nigel 93 /(?!alphabet)[ab]/IS
269 nigel 41
270 nigel 93 /(?<=foo\n)^bar/Im
271 ph10 102 foo\nbarbar
272 nigel 75 ***Failers
273 ph10 102 rhubarb
274 nigel 75 barbell
275 ph10 102 abc\nbarton
276 nigel 41
277 nigel 93 /^(?<=foo\n)bar/Im
278 ph10 102 foo\nbarbar
279 nigel 75 ***Failers
280 ph10 102 rhubarb
281 nigel 75 barbell
282 ph10 102 abc\nbarton
283 nigel 75
284 nigel 93 /(?>^abc)/Im
285 nigel 41 abc
286     def\nabc
287     *** Failers
288 ph10 102 defabc
289 nigel 41
290     /(?<=ab(c+)d)ef/
291    
292     /(?<=ab(?<=c+)d)ef/
293    
294     /(?<=ab(c|de)f)g/
295    
296     /The next three are in testinput2 because they have variable length branches/
297    
298 nigel 93 /(?<=bullock|donkey)-cart/I
299 nigel 41 the bullock-cart
300     a donkey-cart race
301     *** Failers
302     cart
303 ph10 102 horse-and-cart
304    
305 nigel 93 /(?<=ab(?i)x|y|z)/I
306 nigel 41
307 nigel 93 /(?>.*)(?<=(abcd)|(xyz))/I
308 nigel 41 alphabetabcd
309     endingxyz
310    
311 nigel 93 /(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/I
312 nigel 41 abxyZZ
313     abXyZZ
314     ZZZ
315     zZZ
316     bZZ
317 ph10 102 BZZ
318 nigel 41 *** Failers
319 ph10 102 ZZ
320     abXYZZ
321 nigel 41 zzz
322 ph10 102 bzz
323 nigel 41
324 nigel 93 /(?<!(foo)a)bar/I
325 nigel 41 bar
326 ph10 102 foobbar
327 nigel 41 *** Failers
328 ph10 102 fooabar
329 nigel 41
330 nigel 93 /This one is here because Perl 5.005_02 doesn't fail it/I
331 nigel 41
332 nigel 93 /^(a)?(?(1)a|b)+$/I
333 nigel 41 *** Failers
334 ph10 102 a
335 nigel 41
336 nigel 93 /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I
337 nigel 41
338 nigel 93 /^(a\1?){4}$/I
339 nigel 41 aaaaaa
340 ph10 102
341 nigel 93 /These are syntax tests from Perl 5.005/I
342 nigel 41
343     /a[b-a]/
344    
345     /a[]b/
346    
347     /a[/
348    
349     /*a/
350    
351     /(*)b/
352    
353     /abc)/
354    
355     /(abc/
356    
357     /a**/
358    
359     /)(/
360    
361     /\1/
362    
363     /\2/
364    
365     /(a)|\2/
366    
367 nigel 93 /a[b-a]/Ii
368 nigel 41
369 nigel 93 /a[]b/Ii
370 nigel 41
371 nigel 93 /a[/Ii
372 nigel 41
373 nigel 93 /*a/Ii
374 nigel 41
375 nigel 93 /(*)b/Ii
376 nigel 41
377 nigel 93 /abc)/Ii
378 nigel 41
379 nigel 93 /(abc/Ii
380 nigel 41
381 nigel 93 /a**/Ii
382 nigel 41
383 nigel 93 /)(/Ii
384 nigel 41
385     /:(?:/
386    
387     /(?<%)b/
388    
389     /a(?{)b/
390    
391     /a(?{{})b/
392    
393     /a(?{}})b/
394    
395     /a(?{"{"})b/
396    
397     /a(?{"{"}})b/
398    
399     /(?(1?)a|b)/
400    
401     /(?(1)a|b|c)/
402    
403     /[a[:xyz:/
404    
405     /(?<=x+)y/
406    
407     /a{37,17}/
408    
409     /abc/\
410    
411     /abc/\P
412    
413     /abc/\i
414    
415 nigel 93 /(a)bc(d)/I
416 nigel 41 abcd
417     abcd\C2
418     abcd\C5
419 ph10 102
420 nigel 93 /(.{20})/I
421 nigel 41 abcdefghijklmnopqrstuvwxyz
422     abcdefghijklmnopqrstuvwxyz\C1
423     abcdefghijklmnopqrstuvwxyz\G1
424 ph10 102
425 nigel 93 /(.{15})/I
426 nigel 41 abcdefghijklmnopqrstuvwxyz
427     abcdefghijklmnopqrstuvwxyz\C1\G1
428    
429 nigel 93 /(.{16})/I
430 nigel 41 abcdefghijklmnopqrstuvwxyz
431     abcdefghijklmnopqrstuvwxyz\C1\G1\L
432 ph10 102
433 nigel 93 /^(a|(bc))de(f)/I
434 ph10 102 adef\G1\G2\G3\G4\L
435     bcdef\G1\G2\G3\G4\L
436     adefghijk\C0
437    
438 nigel 93 /^abc\00def/I
439 ph10 102 abc\00def\L\C0
440    
441     /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
442     )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
443 ph10 162 )?)?)?)?)?)?)?)?)?otherword/I
444 nigel 41
445 ph10 161 /.*X/IDZ
446 nigel 41
447 ph10 161 /.*X/IDZs
448 nigel 41
449 ph10 161 /(.*X|^B)/IDZ
450 nigel 41
451 ph10 161 /(.*X|^B)/IDZs
452 ph10 102
453 ph10 161 /(?s)(.*X|^B)/IDZ
454 nigel 41
455 ph10 161 /(?s:.*X|^B)/IDZ
456 nigel 41
457 nigel 93 /\Biss\B/I+
458 nigel 41 Mississippi
459    
460 nigel 93 /\Biss\B/I+P
461 nigel 41 Mississippi
462    
463 nigel 93 /iss/IG+
464 nigel 41 Mississippi
465    
466 nigel 93 /\Biss\B/IG+
467 nigel 41 Mississippi
468    
469 nigel 93 /\Biss\B/Ig+
470 nigel 41 Mississippi
471     *** Failers
472     Mississippi\A
473    
474 nigel 93 /(?<=[Ms])iss/Ig+
475 nigel 41 Mississippi
476    
477 nigel 93 /(?<=[Ms])iss/IG+
478 nigel 41 Mississippi
479    
480 nigel 93 /^iss/Ig+
481 nigel 41 ississippi
482 ph10 102
483 nigel 93 /.*iss/Ig+
484 ph10 102 abciss\nxyzisspqr
485 nigel 41
486 nigel 93 /.i./I+g
487 nigel 41 Mississippi
488     Mississippi\A
489     Missouri river
490 ph10 102 Missouri river\A
491 nigel 41
492 nigel 93 /^.is/I+g
493 nigel 41 Mississippi
494    
495 nigel 93 /^ab\n/Ig+
496 nigel 41 ab\nab\ncd
497    
498 nigel 93 /^ab\n/Img+
499 nigel 41 ab\nab\ncd
500    
501 nigel 93 /abc/I
502 nigel 41
503 nigel 93 /abc|bac/I
504 nigel 41
505 nigel 93 /(abc|bac)/I
506 nigel 41
507 nigel 93 /(abc|(c|dc))/I
508 nigel 41
509 nigel 93 /(abc|(d|de)c)/I
510 nigel 41
511 nigel 93 /a*/I
512 nigel 41
513 nigel 93 /a+/I
514 nigel 41
515 nigel 93 /(baa|a+)/I
516 nigel 41
517 nigel 93 /a{0,3}/I
518 nigel 41
519 nigel 93 /baa{3,}/I
520 nigel 41
521 nigel 93 /"([^\\"]+|\\.)*"/I
522 nigel 41
523 nigel 93 /(abc|ab[cd])/I
524 nigel 41
525 nigel 93 /(a|.)/I
526 nigel 41
527 nigel 93 /a|ba|\w/I
528 nigel 41
529 nigel 93 /abc(?=pqr)/I
530 nigel 41
531 nigel 93 /...(?<=abc)/I
532 nigel 41
533 nigel 93 /abc(?!pqr)/I
534 nigel 41
535 nigel 93 /ab./I
536 nigel 41
537 nigel 93 /ab[xyz]/I
538 nigel 41
539 nigel 93 /abc*/I
540 nigel 41
541 nigel 93 /ab.c*/I
542 nigel 41
543 nigel 93 /a.c*/I
544 nigel 41
545 nigel 93 /.c*/I
546 nigel 41
547 nigel 93 /ac*/I
548 nigel 41
549 nigel 93 /(a.c*|b.c*)/I
550 nigel 41
551 nigel 93 /a.c*|aba/I
552 nigel 41
553 nigel 93 /.+a/I
554 nigel 41
555 nigel 93 /(?=abcda)a.*/I
556 nigel 41
557 nigel 93 /(?=a)a.*/I
558 nigel 41
559 nigel 93 /a(b)*/I
560 nigel 41
561 nigel 93 /a\d*/I
562 nigel 41
563 nigel 93 /ab\d*/I
564 nigel 41
565 nigel 93 /a(\d)*/I
566 nigel 41
567 nigel 93 /abcde{0,0}/I
568 nigel 41
569 nigel 93 /ab\d+/I
570 nigel 41
571 nigel 93 /a(?(1)b)/I
572 nigel 41
573 nigel 93 /a(?(1)bag|big)/I
574 nigel 41
575 nigel 93 /a(?(1)bag|big)*/I
576 nigel 41
577 nigel 93 /a(?(1)bag|big)+/I
578 nigel 41
579 nigel 93 /a(?(1)b..|b..)/I
580 nigel 41
581 nigel 93 /ab\d{0}e/I
582 nigel 41
583 nigel 93 /a?b?/I
584 nigel 41 a
585     b
586     ab
587     \
588     *** Failers
589 ph10 102 \N
590    
591 nigel 93 /|-/I
592 nigel 41 abcd
593     -abc
594     \Nab-c
595     *** Failers
596 ph10 102 \Nabc
597 nigel 41
598 nigel 93 /a*(b+)(z)(z)/IP
599 nigel 41 aaaabbbbzzzz
600     aaaabbbbzzzz\O0
601     aaaabbbbzzzz\O1
602     aaaabbbbzzzz\O2
603     aaaabbbbzzzz\O3
604     aaaabbbbzzzz\O4
605     aaaabbbbzzzz\O5
606    
607 ph10 102 /^.?abcd/IS
608    
609 nigel 43 /\( # ( at start
610     (?: # Non-capturing bracket
611     (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
612     | # Or
613     (?R) # Recurse - i.e. nested bracketed string
614     )* # Zero or more contents
615     \) # Closing )
616 nigel 93 /Ix
617 nigel 43 (abcd)
618     (abcd)xyz
619     xyz(abcd)
620 ph10 102 (ab(xy)cd)pqr
621     (ab(xycd)pqr
622     () abc ()
623 nigel 43 12(abcde(fsh)xyz(foo(bar))lmno)89
624     *** Failers
625 ph10 102 abcd
626 nigel 43 abcd)
627 ph10 102 (abcd
628 nigel 43
629 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ixg
630 ph10 102 (ab(xy)cd)pqr
631 nigel 43 1(abcd)(x(y)z)pqr
632    
633 nigel 93 /\( (?: (?>[^()]+) | (?R) ) \) /Ix
634 nigel 43 (abcd)
635     (ab(xy)cd)
636 ph10 102 (a(b(c)d)e)
637     ((ab))
638 nigel 43 *** Failers
639 ph10 102 ()
640 nigel 43
641 nigel 93 /\( (?: (?>[^()]+) | (?R) )? \) /Ix
642 nigel 43 ()
643     12(abcde(fsh)xyz(foo(bar))lmno)89
644    
645 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ix
646 nigel 43 (ab(xy)cd)
647    
648 nigel 93 /\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
649 nigel 43 (ab(xy)cd)
650    
651 nigel 93 /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
652 nigel 43 (ab(xy)cd)
653     (123ab(xy)cd)
654    
655 nigel 93 /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
656 nigel 43 (ab(xy)cd)
657     (123ab(xy)cd)
658    
659 nigel 93 /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
660 nigel 43 (ab(xy)cd)
661    
662 nigel 93 /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
663 nigel 43 (abcd(xyz<p>qrs)123)
664    
665 nigel 93 /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
666 nigel 43 (ab(cd)ef)
667     (ab(cd(ef)gh)ij)
668    
669 ph10 161 /^[[:alnum:]]/DZ
670 nigel 43
671 ph10 161 /^[[:^alnum:]]/DZ
672 nigel 75
673 ph10 161 /^[[:alpha:]]/DZ
674 nigel 75
675 ph10 161 /^[[:^alpha:]]/DZ
676 ph10 102
677 nigel 87 /[_[:alpha:]]/IS
678    
679 ph10 161 /^[[:ascii:]]/DZ
680 nigel 43
681 ph10 161 /^[[:^ascii:]]/DZ
682 nigel 75
683 ph10 161 /^[[:blank:]]/DZ
684 nigel 63
685 ph10 161 /^[[:^blank:]]/DZ
686 nigel 87
687     /[\n\x0b\x0c\x0d[:blank:]]/IS
688    
689 ph10 161 /^[[:cntrl:]]/DZ
690 nigel 43
691 ph10 161 /^[[:digit:]]/DZ
692 nigel 43
693 ph10 161 /^[[:graph:]]/DZ
694 nigel 43
695 ph10 161 /^[[:lower:]]/DZ
696 nigel 43
697 ph10 161 /^[[:print:]]/DZ
698 nigel 43
699 ph10 161 /^[[:punct:]]/DZ
700 nigel 43
701 ph10 161 /^[[:space:]]/DZ
702 nigel 43
703 ph10 161 /^[[:upper:]]/DZ
704 nigel 43
705 ph10 161 /^[[:xdigit:]]/DZ
706 nigel 43
707 ph10 161 /^[[:word:]]/DZ
708 nigel 43
709 ph10 161 /^[[:^cntrl:]]/DZ
710 nigel 43
711 ph10 161 /^[12[:^digit:]]/DZ
712 nigel 43
713 ph10 161 /^[[:^blank:]]/DZ
714 nigel 63
715 ph10 161 /[01[:alpha:]%]/DZ
716 nigel 43
717 nigel 93 /[[.ch.]]/I
718 nigel 43
719 nigel 93 /[[=ch=]]/I
720 nigel 43
721 nigel 93 /[[:rhubarb:]]/I
722 nigel 43
723 nigel 93 /[[:upper:]]/Ii
724 nigel 43 A
725 ph10 102 a
726    
727 nigel 93 /[[:lower:]]/Ii
728 nigel 43 A
729 ph10 102 a
730 nigel 43
731 nigel 93 /((?-i)[[:lower:]])[[:lower:]]/Ii
732 nigel 43 ab
733     aB
734     *** Failers
735     Ab
736 ph10 102 AB
737 nigel 43
738 nigel 93 /[\200-\110]/I
739 nigel 49
740 nigel 93 /^(?(0)f|b)oo/I
741 nigel 51
742 nigel 93 /This one's here because of the large output vector needed/I
743 nigel 53
744 nigel 93 /(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/I
745 nigel 53 \O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
746    
747 nigel 93 /This one's here because Perl does this differently and PCRE can't at present/I
748 nigel 53
749 nigel 93 /(main(O)?)+/I
750 nigel 53 mainmain
751     mainOmain
752 ph10 102
753 nigel 93 /These are all cases where Perl does it differently (nested captures)/I
754 nigel 63
755 nigel 93 /^(a(b)?)+$/I
756 nigel 63 aba
757 ph10 102
758 nigel 93 /^(aa(bb)?)+$/I
759 ph10 102 aabbaa
760    
761 nigel 93 /^(aa|aa(bb))+$/I
762 ph10 102 aabbaa
763    
764 nigel 93 /^(aa(bb)??)+$/I
765 ph10 102 aabbaa
766    
767 nigel 93 /^(?:aa(bb)?)+$/I
768 ph10 102 aabbaa
769    
770 nigel 93 /^(aa(b(b))?)+$/I
771 ph10 102 aabbaa
772 nigel 63
773 nigel 93 /^(?:aa(b(b))?)+$/I
774 ph10 102 aabbaa
775 nigel 63
776 nigel 93 /^(?:aa(b(?:b))?)+$/I
777 ph10 102 aabbaa
778 nigel 63
779 nigel 93 /^(?:aa(bb(?:b))?)+$/I
780 ph10 102 aabbbaa
781    
782 nigel 93 /^(?:aa(b(?:bb))?)+$/I
783 ph10 102 aabbbaa
784 nigel 63
785 nigel 93 /^(?:aa(?:b(b))?)+$/I
786 ph10 102 aabbaa
787 nigel 63
788 nigel 93 /^(?:aa(?:b(bb))?)+$/I
789 ph10 102 aabbbaa
790 nigel 63
791 nigel 93 /^(aa(b(bb))?)+$/I
792 ph10 102 aabbbaa
793 nigel 63
794 nigel 93 /^(aa(bb(bb))?)+$/I
795 ph10 102 aabbbbaa
796 nigel 63
797 ph10 102 /--------------------------------------------------------------------/I
798    
799 ph10 162 /#/IxDZ
800 nigel 63
801 ph10 162 /a#/IxDZ
802 nigel 63
803 ph10 161 /[\s]/DZ
804 nigel 63
805 ph10 161 /[\S]/DZ
806 nigel 63
807 ph10 161 /a(?i)b/DZ
808 nigel 63 ab
809     aB
810 ph10 102 *** Failers
811     AB
812 nigel 63
813 ph10 161 /(a(?i)b)/DZ
814 nigel 63 ab
815     aB
816 ph10 102 *** Failers
817     AB
818    
819 ph10 161 / (?i)abc/IxDZ
820 nigel 63
821     /#this is a comment
822 ph10 161 (?i)abc/IxDZ
823 nigel 63
824 ph10 161 /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
825 nigel 63
826 ph10 161 /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
827 nigel 63
828 ph10 161 /\Q\E/DZ
829 nigel 63 \
830    
831 ph10 161 /\Q\Ex/DZ
832 nigel 63
833 ph10 161 / \Q\E/DZ
834 nigel 63
835 ph10 161 /a\Q\E/DZ
836 nigel 63 abc
837     bca
838 ph10 102 bac
839 nigel 63
840 ph10 161 /a\Q\Eb/DZ
841 nigel 63 abc
842    
843 ph10 161 /\Q\Eabc/DZ
844 nigel 63
845 ph10 161 /x*+\w/DZ
846 nigel 63 *** Failers
847     xxxxx
848 ph10 102
849 ph10 161 /x?+/DZ
850 nigel 63
851 ph10 161 /x++/DZ
852 nigel 63
853 ph10 161 /x{1,3}+/DZ
854 nigel 63
855 ph10 161 /(x)*+/DZ
856 nigel 63
857 nigel 93 /^(\w++|\s++)*$/I
858 nigel 63 now is the time for all good men to come to the aid of the party
859     *** Failers
860     this is not a line with only words and spaces!
861 ph10 102
862 nigel 93 /(\d++)(\w)/I
863 nigel 63 12345a
864     *** Failers
865 ph10 102 12345+
866 nigel 63
867 nigel 93 /a++b/I
868 nigel 63 aaab
869    
870 nigel 93 /(a++b)/I
871 nigel 63 aaab
872    
873 nigel 93 /(a++)b/I
874 nigel 63 aaab
875    
876 nigel 93 /([^()]++|\([^()]*\))+/I
877 nigel 63 ((abc(ade)ufh()()x
878 ph10 102
879     /\(([^()]++|\([^()]+\))+\)/I
880 nigel 63 (abc)
881     (abc(def)xyz)
882     *** Failers
883 ph10 102 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
884 nigel 63
885 ph10 161 /(abc){1,3}+/DZ
886 nigel 63
887 nigel 93 /a+?+/I
888 nigel 63
889 nigel 93 /a{2,3}?+b/I
890 nigel 63
891 nigel 93 /(?U)a+?+/I
892 nigel 63
893 nigel 93 /a{2,3}?+b/IU
894 nigel 63
895 ph10 161 /x(?U)a++b/DZ
896 nigel 63 xaaaab
897    
898 ph10 161 /(?U)xa++b/DZ
899 nigel 63 xaaaab
900    
901 ph10 161 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
902 nigel 63
903 ph10 161 /^x(?U)a+b/DZ
904 nigel 63
905 ph10 161 /^x(?U)(a+)b/DZ
906 nigel 63
907 nigel 93 /[.x.]/I
908 nigel 63
909 nigel 93 /[=x=]/I
910 nigel 63
911 nigel 93 /[:x:]/I
912 nigel 63
913 nigel 93 /\l/I
914 nigel 63
915 nigel 93 /\L/I
916 nigel 63
917 nigel 93 /\N{name}/I
918 nigel 63
919 nigel 93 /\u/I
920 nigel 63
921 nigel 93 /\U/I
922 nigel 63
923 nigel 93 /[/I
924 nigel 63
925 nigel 93 /[a-/I
926 nigel 63
927 nigel 93 /[[:space:]/I
928 nigel 63
929 ph10 162 /[\s]/IDZ
930 nigel 63
931 ph10 162 /[[:space:]]/IDZ
932 nigel 63
933 ph10 162 /[[:space:]abcde]/IDZ
934 nigel 63
935 nigel 93 /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
936 nigel 63 <>
937     <abcd>
938     <abc <123> hij>
939     <abc <def> hij>
940 ph10 102 <abc<>def>
941     <abc<>
942 nigel 63 *** Failers
943     <abc
944    
945 ph10 162 |8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
946 nigel 63
947 ph10 162 |\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|IDZ
948 nigel 63
949     /(.*)\d+\1/I
950    
951     /(.*)\d+/I
952 ph10 102
953 nigel 63 /(.*)\d+\1/Is
954    
955     /(.*)\d+/Is
956    
957     /(.*(xyz))\d+\2/I
958    
959     /((.*))\d+\1/I
960     abc123bc
961 ph10 102
962 nigel 63 /a[b]/I
963    
964     /(?=a).*/I
965    
966 nigel 93 /(?=abc).xyz/IiI
967 nigel 63
968     /(?=abc)(?i).xyz/I
969    
970     /(?=a)(?=b)/I
971    
972     /(?=.)a/I
973    
974     /((?=abcda)a)/I
975    
976     /((?=abcda)ab)/I
977    
978     /()a/I
979    
980     /(?(1)ab|ac)/I
981    
982     /(?(1)abz|acz)/I
983    
984     /(?(1)abz)/I
985    
986     /(?(1)abz)123/I
987    
988     /(a)+/I
989    
990     /(a){2,3}/I
991    
992     /(a)*/I
993    
994     /[a]/I
995    
996     /[ab]/I
997    
998     /[ab]/IS
999    
1000     /[^a]/I
1001    
1002     /\d456/I
1003    
1004     /\d456/IS
1005    
1006     /a^b/I
1007    
1008 nigel 93 /^a/Im
1009 nigel 63 abcde
1010 ph10 102 xy\nabc
1011     *** Failers
1012     xyabc
1013 nigel 63
1014     /c|abc/I
1015    
1016     /(?i)[ab]/IS
1017    
1018     /[ab](?i)cd/IS
1019    
1020 nigel 93 /abc(?C)def/I
1021 nigel 63 abcdef
1022 ph10 102 1234abcdef
1023 nigel 63 *** Failers
1024     abcxyz
1025 ph10 102 abcxyzf
1026 nigel 63
1027 nigel 93 /abc(?C)de(?C1)f/I
1028 nigel 63 123abcdef
1029 ph10 102
1030     /(?C1)\dabc(?C2)def/I
1031 nigel 63 1234abcdef
1032     *** Failers
1033 ph10 102 abcdef
1034    
1035 nigel 93 /(?C255)ab/I
1036 nigel 63
1037 nigel 93 /(?C256)ab/I
1038 nigel 63
1039 ph10 102 /(?Cab)xx/I
1040 nigel 63
1041 nigel 93 /(?C12vr)x/I
1042 nigel 63
1043 nigel 93 /abc(?C)def/I
1044 nigel 63 *** Failers
1045     \x83\x0\x61bcdef
1046    
1047 nigel 93 /(abc)(?C)de(?C1)f/I
1048 nigel 63 123abcdef
1049 ph10 102 123abcdef\C+
1050     123abcdef\C-
1051 nigel 63 *** Failers
1052 ph10 102 123abcdef\C!1
1053    
1054 nigel 93 /(?C0)(abc(?C1))*/I
1055 nigel 63 abcabcabc
1056 ph10 102 abcabc\C!1!3
1057 nigel 63 *** Failers
1058 ph10 102 abcabcabc\C!1!3
1059 nigel 63
1060 nigel 93 /(\d{3}(?C))*/I
1061 nigel 63 123\C+
1062     123456\C+
1063 ph10 102 123456789\C+
1064 nigel 63
1065 nigel 93 /((xyz)(?C)p|(?C1)xyzabc)/I
1066 nigel 63 xyzabc\C+
1067    
1068 nigel 93 /(X)((xyz)(?C)p|(?C1)xyzabc)/I
1069 nigel 63 Xxyzabc\C+
1070    
1071 nigel 93 /(?=(abc))(?C)abcdef/I
1072 nigel 63 abcdef\C+
1073 ph10 102
1074 nigel 93 /(?!(abc)(?C1)d)(?C2)abcxyz/I
1075 ph10 102 abcxyz\C+
1076 nigel 63
1077 nigel 93 /(?<=(abc)(?C))xyz/I
1078 nigel 63 abcxyz\C+
1079 ph10 102
1080 nigel 93 /a(b+)(c*)(?C1)/I
1081 nigel 77 abbbbbccc\C*1
1082    
1083 nigel 93 /a(b+?)(c*?)(?C1)/I
1084 nigel 77 abbbbbccc\C*1
1085 nigel 63
1086 ph10 102 /(?C)abc/I
1087    
1088 nigel 93 /(?C)^abc/I
1089 nigel 63
1090 nigel 93 /(?C)a|b/IS
1091 nigel 63
1092 nigel 93 /(?R)/I
1093 nigel 63
1094 nigel 93 /(a|(?R))/I
1095 nigel 63
1096 nigel 93 /(ab|(bc|(de|(?R))))/I
1097 nigel 63
1098 nigel 93 /x(ab|(bc|(de|(?R))))/I
1099 nigel 63 xab
1100     xbc
1101     xde
1102     xxab
1103     xxxab
1104     *** Failers
1105 ph10 102 xyab
1106 nigel 63
1107 nigel 93 /(ab|(bc|(de|(?1))))/I
1108 nigel 63
1109 nigel 93 /x(ab|(bc|(de|(?1)x)x)x)/I
1110 nigel 63
1111 nigel 93 /^([^()]|\((?1)*\))*$/I
1112 nigel 63 abc
1113     a(b)c
1114 ph10 102 a(b(c))d
1115 nigel 63 *** Failers)
1116 ph10 102 a(b(c)d
1117 nigel 63
1118 nigel 93 /^>abc>([^()]|\((?1)*\))*<xyz<$/I
1119 nigel 63 >abc>123<xyz<
1120     >abc>1(2)3<xyz<
1121     >abc>(1(2)3)<xyz<
1122    
1123 ph10 161 /(a(?1)b)/DZ
1124 nigel 63
1125 ph10 161 /(a(?1)+b)/DZ
1126 nigel 63
1127 nigel 93 /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii
1128 nigel 63 1221
1129     Satan, oscillate my metallic sonatas!
1130     A man, a plan, a canal: Panama!
1131 ph10 102 Able was I ere I saw Elba.
1132 nigel 63 *** Failers
1133 ph10 102 The quick brown fox
1134    
1135 nigel 93 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1136 nigel 63 12
1137     (((2+2)*-3)-7)
1138     -12
1139     *** Failers
1140     ((2+2)*-3)-7)
1141 ph10 102
1142 nigel 93 /^(x(y|(?1){2})z)/I
1143 nigel 63 xyz
1144 ph10 102 xxyzxyzz
1145 nigel 63 *** Failers
1146     xxyzz
1147 ph10 102 xxyzxyzxyzz
1148 nigel 63
1149 nigel 93 /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
1150 nigel 63 <>
1151     <abcd>
1152     <abc <123> hij>
1153     <abc <def> hij>
1154 ph10 102 <abc<>def>
1155     <abc<>
1156 nigel 63 *** Failers
1157     <abc
1158    
1159 nigel 93 /(?1)/I
1160 nigel 63
1161 nigel 93 /((?2)(abc)/I
1162 nigel 63
1163 nigel 93 /^(abc)def(?1)/I
1164 nigel 63 abcdefabc
1165    
1166 nigel 93 /^(a|b|c)=(?1)+/I
1167 nigel 63 a=a
1168     a=b
1169 ph10 102 a=bc
1170 nigel 63
1171 nigel 93 /^(a|b|c)=((?1))+/I
1172 nigel 63 a=a
1173     a=b
1174 ph10 102 a=bc
1175 nigel 63
1176 ph10 161 /a(?P<name1>b|c)d(?P<longername2>e)/DZ
1177 nigel 63 abde
1178 ph10 102 acde
1179 nigel 63
1180 ph10 161 /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
1181 nigel 63
1182 ph10 161 /(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
1183 nigel 63
1184 nigel 93 /^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/Ii
1185 nigel 63 1221
1186     Satan, oscillate my metallic sonatas!
1187     A man, a plan, a canal: Panama!
1188 ph10 102 Able was I ere I saw Elba.
1189 nigel 63 *** Failers
1190 ph10 102 The quick brown fox
1191    
1192 nigel 93 /((?(R)a|b))\1(?1)?/I
1193 nigel 63 bb
1194 ph10 102 bbaa
1195 nigel 63
1196 nigel 93 /(.*)a/Is
1197 nigel 63
1198 nigel 93 /(.*)a\1/Is
1199 nigel 63
1200 nigel 93 /(.*)a(b)\2/Is
1201 nigel 63
1202 nigel 93 /((.*)a|(.*)b)z/Is
1203 nigel 63
1204 nigel 93 /((.*)a|(.*)b)z\1/Is
1205 nigel 63
1206 nigel 93 /((.*)a|(.*)b)z\2/Is
1207 nigel 63
1208 nigel 93 /((.*)a|(.*)b)z\3/Is
1209 nigel 63
1210 nigel 93 /((.*)a|^(.*)b)z\3/Is
1211 nigel 63
1212 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
1213 nigel 63
1214 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
1215 nigel 63
1216 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
1217 nigel 63
1218 ph10 161 /(a)(bc)/INDZ
1219 nigel 63 abc
1220    
1221 ph10 161 /(?P<one>a)(bc)/INDZ
1222 nigel 63 abc
1223    
1224 ph10 161 /(a)(?P<named>bc)/INDZ
1225 nigel 63
1226 nigel 93 /(a+)*zz/I
1227 nigel 63 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1228     aaaaaaaaaaaaaz\M
1229    
1230 nigel 93 /(aaa(?C1)bbb|ab)/I
1231 nigel 63 aaabbb
1232     aaabbb\C*0
1233     aaabbb\C*1
1234     aaabbb\C*-1
1235    
1236 nigel 93 /ab(?P<one>cd)ef(?P<two>gh)/I
1237 nigel 63 abcdefgh
1238     abcdefgh\C1\Gtwo
1239     abcdefgh\Cone\Ctwo
1240 ph10 102 abcdefgh\Cthree
1241 nigel 63
1242 ph10 161 /(?P<Tes>)(?P<Test>)/DZ
1243 nigel 63
1244 ph10 161 /(?P<Test>)(?P<Tes>)/DZ
1245 nigel 63
1246 nigel 93 /(?P<Z>zz)(?P<A>aa)/I
1247 nigel 63 zzaa\CZ
1248     zzaa\CA
1249    
1250 nigel 93 /(?P<x>eks)(?P<x>eccs)/I
1251 nigel 65
1252 nigel 93 /(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
1253 nigel 65
1254 nigel 93 "\[((?P<elem>\d+)(,(?P>elem))*)\]"I
1255 nigel 73 [10,20,30,5,5,4,4,2,43,23,4234]
1256     *** Failers
1257 ph10 102 []
1258 nigel 73
1259 nigel 93 "\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
1260 nigel 73 [10,20,30,5,5,4,4,2,43,23,4234]
1261 ph10 102 []
1262 nigel 73
1263 ph10 161 /(a(b(?2)c))?/DZ
1264 nigel 73
1265 ph10 161 /(a(b(?2)c))*/DZ
1266 nigel 73
1267 ph10 161 /(a(b(?2)c)){0,2}/DZ
1268 nigel 73
1269 ph10 161 /[ab]{1}+/DZ
1270 nigel 73
1271 nigel 93 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
1272 nigel 73 Baby Bjorn Active Carrier - With free SHIPPING!!
1273    
1274 nigel 93 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
1275 nigel 73 Baby Bjorn Active Carrier - With free SHIPPING!!
1276 ph10 102
1277 ph10 161 /a*.*b/ISDZ
1278 nigel 73
1279 ph10 161 /(a|b)*.?c/ISDZ
1280 nigel 73
1281 ph10 161 /abc(?C255)de(?C)f/DZ
1282 nigel 75
1283 ph10 161 /abcde/ICDZ
1284 nigel 75 abcde
1285 ph10 102 abcdfe
1286    
1287 ph10 161 /a*b/ICDZ
1288 nigel 75 ab
1289     aaaab
1290 ph10 102 aaaacb
1291 nigel 75
1292 ph10 161 /a+b/ICDZ
1293 nigel 75 ab
1294     aaaab
1295 ph10 102 aaaacb
1296 nigel 75
1297 ph10 161 /(abc|def)x/ICDZ
1298 nigel 75 abcx
1299     defx
1300     abcdefzx
1301    
1302 nigel 93 /(ab|cd){3,4}/IC
1303 nigel 75 ababab
1304     abcdabcd
1305 ph10 102 abcdcdcdcdcd
1306 nigel 75
1307 ph10 161 /([ab]{,4}c|xy)/ICDZ
1308 nigel 75 Note: that { does NOT introduce a quantifier
1309    
1310 ph10 161 /([ab]{1,4}c|xy){4,5}?123/ICDZ
1311 nigel 75 aacaacaacaacaac123
1312    
1313     /\b.*/I
1314     ab cd\>1
1315 ph10 102
1316     /\b.*/Is
1317 nigel 75 ab cd\>1
1318 ph10 102
1319 nigel 75 /(?!.bcd).*/I
1320 ph10 102 Xbcd12345
1321 nigel 75
1322 nigel 93 /abcde/I
1323 nigel 75 ab\P
1324     abc\P
1325     abcd\P
1326 ph10 102 abcde\P
1327 nigel 75 the quick brown abc\P
1328     ** Failers\P
1329     the quick brown abxyz fox\P
1330 ph10 102
1331 nigel 93 "^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
1332 nigel 75 13/05/04\P
1333     13/5/2004\P
1334 ph10 102 02/05/09\P
1335 nigel 75 1\P
1336     1/2\P
1337     1/2/0\P
1338 ph10 102 1/2/04\P
1339 nigel 75 0\P
1340     02/\P
1341 ph10 102 02/0\P
1342 nigel 75 02/1\P
1343     ** Failers\P
1344     \P
1345     123\P
1346     33/4/04\P
1347     3/13/04\P
1348     0/1/2003\P
1349 ph10 102 0/\P
1350     02/0/\P
1351     02/13\P
1352 nigel 75
1353     /0{0,2}ABC/I
1354 ph10 102
1355 nigel 75 /\d{3,}ABC/I
1356 ph10 102
1357 nigel 75 /\d*ABC/I
1358    
1359     /[abc]+DE/I
1360    
1361 nigel 93 /[abc]?123/I
1362 nigel 75 123\P
1363     a\P
1364     b\P
1365     c\P
1366     c12\P
1367 ph10 102 c123\P
1368 nigel 75
1369 nigel 93 /^(?:\d){3,5}X/I
1370 nigel 75 1\P
1371     123\P
1372     123X
1373     1234\P
1374     1234X
1375     12345\P
1376 ph10 102 12345X
1377     *** Failers
1378     1X
1379     123456\P
1380 nigel 75
1381 nigel 93 /abc/I>testsavedregex
1382 nigel 75 <testsavedregex
1383     abc
1384     ** Failers
1385     bca
1386 ph10 102
1387 nigel 93 /abc/IF>testsavedregex
1388 nigel 75 <testsavedregex
1389     abc
1390     ** Failers
1391     bca
1392    
1393 nigel 93 /(a|b)/IS>testsavedregex
1394 nigel 75 <testsavedregex
1395     abc
1396     ** Failers
1397 ph10 102 def
1398    
1399 nigel 93 /(a|b)/ISF>testsavedregex
1400 nigel 75 <testsavedregex
1401     abc
1402     ** Failers
1403 ph10 102 def
1404    
1405 nigel 93 ~<(\w+)/?>(.)*</(\1)>~smgI
1406 nigel 75 <!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>
1407    
1408     /^a/IF
1409    
1410 nigel 93 /line\nbreak/I
1411 nigel 77 this is a line\nbreak
1412 ph10 102 line one\nthis is a line\nbreak in the second line
1413 nigel 77
1414 nigel 93 /line\nbreak/If
1415 nigel 77 this is a line\nbreak
1416 ph10 102 ** Failers
1417     line one\nthis is a line\nbreak in the second line
1418 nigel 77
1419 nigel 93 /line\nbreak/Imf
1420 nigel 77 this is a line\nbreak
1421 ph10 102 ** Failers
1422     line one\nthis is a line\nbreak in the second line
1423 nigel 77
1424 nigel 93 /ab.cd/IP
1425 nigel 77 ab-cd
1426 ph10 102 ab=cd
1427 nigel 77 ** Failers
1428     ab\ncd
1429    
1430 nigel 93 /ab.cd/IPs
1431 nigel 77 ab-cd
1432 ph10 102 ab=cd
1433 nigel 77 ab\ncd
1434    
1435 nigel 93 /(?i)(?-i)AbCd/I
1436 nigel 79 AbCd
1437     ** Failers
1438 ph10 102 abcd
1439    
1440 nigel 93 /a{11111111111111111111}/I
1441 nigel 79
1442 nigel 93 /(){64294967295}/I
1443 nigel 81
1444 nigel 93 /(){2,4294967295}/I
1445 nigel 81
1446 nigel 93 "(?i:a)(?i:b)(?i:c)(?i:d)(?i:e)(?i:f)(?i:g)(?i:h)(?i:i)(?i:j)(k)(?i:l)A\1B"I
1447 nigel 81 abcdefghijklAkB
1448    
1449 nigel 93 "(?P<n0>a)(?P<n1>b)(?P<n2>c)(?P<n3>d)(?P<n4>e)(?P<n5>f)(?P<n6>g)(?P<n7>h)(?P<n8>i)(?P<n9>j)(?P<n10>k)(?P<n11>l)A\11B"I
1450 nigel 81 abcdefghijklAkB
1451    
1452 nigel 93 "(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
1453 nigel 81 abcdefghijklAkB
1454    
1455 nigel 93 "(?P<name0>a)(?P<name1>a)(?P<name2>a)(?P<name3>a)(?P<name4>a)(?P<name5>a)(?P<name6>a)(?P<name7>a)(?P<name8>a)(?P<name9>a)(?P<name10>a)(?P<name11>a)(?P<name12>a)(?P<name13>a)(?P<name14>a)(?P<name15>a)(?P<name16>a)(?P<name17>a)(?P<name18>a)(?P<name19>a)(?P<name20>a)(?P<name21>a)(?P<name22>a)(?P<name23>a)(?P<name24>a)(?P<name25>a)(?P<name26>a)(?P<name27>a)(?P<name28>a)(?P<name29>a)(?P<name30>a)(?P<name31>a)(?P<name32>a)(?P<name33>a)(?P<name34>a)(?P<name35>a)(?P<name36>a)(?P<name37>a)(?P<name38>a)(?P<name39>a)(?P<name40>a)(?P<name41>a)(?P<name42>a)(?P<name43>a)(?P<name44>a)(?P<name45>a)(?P<name46>a)(?P<name47>a)(?P<name48>a)(?P<name49>a)(?P<name50>a)(?P<name51>a)(?P<name52>a)(?P<name53>a)(?P<name54>a)(?P<name55>a)(?P<name56>a)(?P<name57>a)(?P<name58>a)(?P<name59>a)(?P<name60>a)(?P<name61>a)(?P<name62>a)(?P<name63>a)(?P<name64>a)(?P<name65>a)(?P<name66>a)(?P<name67>a)(?P<name68>a)(?P<name69>a)(?P<name70>a)(?P<name71>a)(?P<name72>a)(?P<name73>a)(?P<name74>a)(?P<name75>a)(?P<name76>a)(?P<name77>a)(?P<name78>a)(?P<name79>a)(?P<name80>a)(?P<name81>a)(?P<name82>a)(?P<name83>a)(?P<name84>a)(?P<name85>a)(?P<name86>a)(?P<name87>a)(?P<name88>a)(?P<name89>a)(?P<name90>a)(?P<name91>a)(?P<name92>a)(?P<name93>a)(?P<name94>a)(?P<name95>a)(?P<name96>a)(?P<name97>a)(?P<name98>a)(?P<name99>a)(?P<name100>a)"I
1456 nigel 81 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1457    
1458 nigel 93 "(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)(a)"I
1459 nigel 81 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1460    
1461 nigel 93 /[^()]*(?:\((?R)\)[^()]*)*/I
1462 nigel 87 (this(and)that
1463 ph10 102 (this(and)that)
1464 nigel 87 (this(and)that)stuff
1465    
1466 nigel 93 /[^()]*(?:\((?>(?R))\)[^()]*)*/I
1467 nigel 87 (this(and)that
1468 ph10 102 (this(and)that)
1469    
1470 nigel 93 /[^()]*(?:\((?R)\))*[^()]*/I
1471 nigel 87 (this(and)that
1472 ph10 102 (this(and)that)
1473 nigel 87
1474 nigel 93 /(?:\((?R)\))*[^()]*/I
1475 nigel 87 (this(and)that
1476 ph10 102 (this(and)that)
1477     ((this))
1478 nigel 87
1479 nigel 93 /(?:\((?R)\))|[^()]*/I
1480 nigel 87 (this(and)that
1481 ph10 102 (this(and)that)
1482 nigel 87 (this)
1483 ph10 102 ((this))
1484    
1485 nigel 93 /a(b)c/IPN
1486 nigel 87 abc
1487 ph10 102
1488 nigel 93 /a(?P<name>b)c/IPN
1489 ph10 102 abc
1490 nigel 87
1491 ph10 102 /\x{100}/I
1492    
1493 nigel 93 /\x{0000ff}/I
1494 nigel 87
1495 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/I
1496 nigel 91
1497 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/IJ
1498 nigel 91 a1b\CA
1499 ph10 102 a2b\CA
1500 nigel 91 ** Failers
1501 ph10 102 a1b\CZ\CA
1502    
1503 nigel 93 /^(?P<A>a)(?P<A>b)/IJ
1504 nigel 91 ab\CA
1505 ph10 102
1506 nigel 93 /^(?P<A>a)(?P<A>b)|cd/IJ
1507 nigel 91 ab\CA
1508 ph10 102 cd\CA
1509    
1510 nigel 93 /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1511 ph10 102 cdefgh\CA
1512    
1513 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/IJ
1514 nigel 91 a1b\GA
1515 ph10 102 a2b\GA
1516 nigel 91 ** Failers
1517 ph10 102 a1b\GZ\GA
1518    
1519 nigel 93 /^(?P<A>a)(?P<A>b)/IJ
1520 nigel 91 ab\GA
1521 ph10 102
1522 nigel 93 /^(?P<A>a)(?P<A>b)|cd/IJ
1523 nigel 91 ab\GA
1524 ph10 102 cd\GA
1525    
1526 nigel 93 /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1527 ph10 102 cdefgh\GA
1528    
1529 nigel 93 /(?J)^((?P<A>a1)|(?P<A>a2)b)/I
1530 nigel 91 a1b\CA
1531 ph10 102 a2b\CA
1532    
1533 nigel 93 /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
1534 nigel 91
1535     / In this next test, J is not set at the outer level; consequently it isn't
1536 ph10 102 set in the pattern's options; consequently pcre_get_named_substring() produces
1537 nigel 93 a random value. /Ix
1538 nigel 91
1539 nigel 93 /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
1540 nigel 91 a bc d\CA\CB\CC
1541    
1542 nigel 93 /^(?P<A>a)?(?(A)a|b)/I
1543 nigel 91 aabc
1544     bc
1545     ** Failers
1546 ph10 102 abc
1547 nigel 91
1548 nigel 93 /(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
1549 nigel 91 bXaX
1550    
1551 nigel 93 /(?:(?(2y)a|b)(X))+/I
1552 nigel 91
1553 nigel 93 /(?:(?(ZA)a|b)(?P<ZZ>X))+/I
1554 nigel 91
1555 nigel 93 /(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
1556 nigel 91 bbXaaX
1557    
1558 nigel 93 /(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
1559 nigel 91 (b)\\Xa\\X
1560    
1561 nigel 93 /(?P<ABC/I
1562 nigel 91
1563 nigel 93 /(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1564 nigel 91 bXXaYYaY
1565 ph10 102 bXYaXXaX
1566 nigel 91
1567 nigel 93 /()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1568 nigel 91 bXXaYYaY
1569    
1570 nigel 93 /\777/I
1571 nigel 91
1572 nigel 93 /\s*,\s*/IS
1573 nigel 91 \x0b,\x0b
1574 ph10 102 \x0c,\x0d
1575 nigel 91
1576 nigel 93 /^abc/Im
1577 nigel 91 xyz\nabc
1578     xyz\nabc\<lf>
1579     xyz\r\nabc\<lf>
1580     xyz\rabc\<cr>
1581     xyz\r\nabc\<crlf>
1582 ph10 102 ** Failers
1583 nigel 91 xyz\nabc\<cr>
1584     xyz\r\nabc\<cr>
1585     xyz\nabc\<crlf>
1586     xyz\rabc\<crlf>
1587     xyz\rabc\<lf>
1588 ph10 102
1589 nigel 93 /abc$/Im<lf>
1590 nigel 91 xyzabc
1591 ph10 102 xyzabc\n
1592     xyzabc\npqr
1593     xyzabc\r\<cr>
1594     xyzabc\rpqr\<cr>
1595     xyzabc\r\n\<crlf>
1596     xyzabc\r\npqr\<crlf>
1597 nigel 91 ** Failers
1598 ph10 102 xyzabc\r
1599     xyzabc\rpqr
1600     xyzabc\r\n
1601     xyzabc\r\npqr
1602    
1603 nigel 93 /^abc/Im<cr>
1604 nigel 91 xyz\rabcdef
1605     xyz\nabcdef\<lf>
1606 ph10 102 ** Failers
1607 nigel 91 xyz\nabcdef
1608 ph10 102
1609 nigel 93 /^abc/Im<lf>
1610 nigel 91 xyz\nabcdef
1611     xyz\rabcdef\<cr>
1612 ph10 102 ** Failers
1613 nigel 91 xyz\rabcdef
1614 ph10 102
1615 nigel 93 /^abc/Im<crlf>
1616 nigel 91 xyz\r\nabcdef
1617     xyz\rabcdef\<cr>
1618 ph10 102 ** Failers
1619 nigel 91 xyz\rabcdef
1620 ph10 102
1621 nigel 93 /^abc/Im<bad>
1622 nigel 91
1623 nigel 93 /abc/I
1624 nigel 91 xyz\rabc\<bad>
1625 ph10 102 abc
1626    
1627 nigel 93 /.*/I<lf>
1628 nigel 91 abc\ndef
1629     abc\rdef
1630     abc\r\ndef
1631     \<cr>abc\ndef
1632     \<cr>abc\rdef
1633     \<cr>abc\r\ndef
1634     \<crlf>abc\ndef
1635     \<crlf>abc\rdef
1636     \<crlf>abc\r\ndef
1637    
1638 nigel 93 /\w+(.)(.)?def/Is
1639 nigel 91 abc\ndef
1640     abc\rdef
1641     abc\r\ndef
1642    
1643 nigel 93 +((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
1644 nigel 91 /* this is a C style comment */\M
1645    
1646 nigel 93 /(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
1647 nigel 91
1648 nigel 93 /()()()()()()()()()()()()()()()()()()()()
1649     ()()()()()()()()()()()()()()()()()()()()
1650     ()()()()()()()()()()()()()()()()()()()()
1651     ()()()()()()()()()()()()()()()()()()()()
1652     ()()()()()()()()()()()()()()()()()()()()
1653     (.(.))/Ix
1654 ph10 102 XY\O400
1655 nigel 93
1656     /(a*b|(?i:c*(?-i)d))/IS
1657    
1658     /()[ab]xyz/IS
1659    
1660     /(|)[ab]xyz/IS
1661    
1662     /(|c)[ab]xyz/IS
1663    
1664     /(|c?)[ab]xyz/IS
1665    
1666     /(d?|c?)[ab]xyz/IS
1667    
1668     /(d?|c)[ab]xyz/IS
1669    
1670 ph10 161 /^a*b\d/DZ
1671 nigel 93
1672 ph10 161 /^a*+b\d/DZ
1673 nigel 93
1674 ph10 161 /^a*?b\d/DZ
1675 nigel 93
1676 ph10 161 /^a+A\d/DZ
1677 nigel 93 aaaA5
1678     ** Failers
1679 ph10 102 aaaa5
1680 nigel 93
1681 ph10 161 /^a*A\d/IiDZ
1682 nigel 93 aaaA5
1683     aaaa5
1684    
1685     /(a*|b*)[cd]/IS
1686    
1687     /(a+|b*)[cd]/IS
1688    
1689     /(a*|b+)[cd]/IS
1690    
1691     /(a+|b+)[cd]/IS
1692    
1693     /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1694     ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1695     (((
1696     a
1697     ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1698     ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1699 ph10 102 )))
1700     /Ix
1701 nigel 93 large nest
1702    
1703 ph10 162 /a*\d/BZ
1704 nigel 93
1705 ph10 162 /a*\D/BZ
1706 nigel 93
1707 ph10 162 /0*\d/BZ
1708 nigel 93
1709 ph10 162 /0*\D/BZ
1710 nigel 93
1711 ph10 162 /a*\s/BZ
1712 nigel 93
1713 ph10 162 /a*\S/BZ
1714 nigel 93
1715 ph10 162 / *\s/BZ
1716 nigel 93
1717 ph10 162 / *\S/BZ
1718 nigel 93
1719 ph10 162 /a*\w/BZ
1720 nigel 93
1721 ph10 162 /a*\W/BZ
1722 nigel 93
1723 ph10 162 /=*\w/BZ
1724 nigel 93
1725 ph10 162 /=*\W/BZ
1726 nigel 93
1727 ph10 162 /\d*a/BZ
1728 nigel 93
1729 ph10 162 /\d*2/BZ
1730 nigel 93
1731 ph10 162 /\d*\d/BZ
1732 nigel 93
1733 ph10 162 /\d*\D/BZ
1734 nigel 93
1735 ph10 162 /\d*\s/BZ
1736 nigel 93
1737 ph10 162 /\d*\S/BZ
1738 nigel 93
1739 ph10 162 /\d*\w/BZ
1740 nigel 93
1741 ph10 162 /\d*\W/BZ
1742 nigel 93
1743 ph10 162 /\D*a/BZ
1744 nigel 93
1745 ph10 162 /\D*2/BZ
1746 nigel 93
1747 ph10 162 /\D*\d/BZ
1748 nigel 93
1749 ph10 162 /\D*\D/BZ
1750 nigel 93
1751 ph10 162 /\D*\s/BZ
1752 nigel 93
1753 ph10 162 /\D*\S/BZ
1754 nigel 93
1755 ph10 162 /\D*\w/BZ
1756 nigel 93
1757 ph10 162 /\D*\W/BZ
1758 nigel 93
1759 ph10 162 /\s*a/BZ
1760 nigel 93
1761 ph10 162 /\s*2/BZ
1762 nigel 93
1763 ph10 162 /\s*\d/BZ
1764 nigel 93
1765 ph10 162 /\s*\D/BZ
1766 nigel 93
1767 ph10 162 /\s*\s/BZ
1768 nigel 93
1769 ph10 162 /\s*\S/BZ
1770 nigel 93
1771 ph10 162 /\s*\w/BZ
1772 nigel 93
1773 ph10 162 /\s*\W/BZ
1774 nigel 93
1775 ph10 162 /\S*a/BZ
1776 nigel 93
1777 ph10 162 /\S*2/BZ
1778 nigel 93
1779 ph10 162 /\S*\d/BZ
1780 nigel 93
1781 ph10 162 /\S*\D/BZ
1782 nigel 93
1783 ph10 162 /\S*\s/BZ
1784 nigel 93
1785 ph10 162 /\S*\S/BZ
1786 nigel 93
1787 ph10 162 /\S*\w/BZ
1788 nigel 93
1789 ph10 162 /\S*\W/BZ
1790 nigel 93
1791 ph10 162 /\w*a/BZ
1792 nigel 93
1793 ph10 162 /\w*2/BZ
1794 nigel 93
1795 ph10 162 /\w*\d/BZ
1796 nigel 93
1797 ph10 162 /\w*\D/BZ
1798 nigel 93
1799 ph10 162 /\w*\s/BZ
1800 nigel 93
1801 ph10 162 /\w*\S/BZ
1802 nigel 93
1803 ph10 162 /\w*\w/BZ
1804 nigel 93
1805 ph10 162 /\w*\W/BZ
1806 nigel 93
1807 ph10 162 /\W*a/BZ
1808 nigel 93
1809 ph10 162 /\W*2/BZ
1810 nigel 93
1811 ph10 162 /\W*\d/BZ
1812 nigel 93
1813 ph10 162 /\W*\D/BZ
1814 nigel 93
1815 ph10 162 /\W*\s/BZ
1816 nigel 93
1817 ph10 162 /\W*\S/BZ
1818 nigel 93
1819 ph10 162 /\W*\w/BZ
1820 nigel 93
1821 ph10 162 /\W*\W/BZ
1822 nigel 93
1823 ph10 162 /[^a]+a/BZ
1824 nigel 93
1825 ph10 162 /[^a]+a/BZi
1826 nigel 93
1827 ph10 162 /[^a]+A/BZi
1828 nigel 93
1829 ph10 162 /[^a]+b/BZ
1830 nigel 93
1831 ph10 162 /[^a]+\d/BZ
1832 nigel 93
1833 ph10 162 /a*[^a]/BZ
1834 nigel 93
1835     /(?P<abc>x)(?P<xyz>y)/I
1836     xy\Cabc\Cxyz
1837    
1838     /(?<abc>x)(?'xyz'y)/I
1839     xy\Cabc\Cxyz
1840    
1841     /(?<abc'x)(?'xyz'y)/I
1842    
1843     /(?<abc>x)(?'xyz>y)/I
1844    
1845     /(?P'abc'x)(?P<xyz>y)/I
1846    
1847     /^(?:(?(ZZ)a|b)(?<ZZ>X))+/
1848     bXaX
1849     bXbX
1850     ** Failers
1851 ph10 102 aXaX
1852     aXbX
1853 nigel 93
1854     /^(?P>abc)(?<abcd>xxx)/
1855    
1856     /^(?P>abc)(?<abc>x|y)/
1857     xx
1858     xy
1859     yy
1860 ph10 102 yx
1861 nigel 93
1862     /^(?P>abc)(?P<abc>x|y)/
1863     xx
1864     xy
1865     yy
1866 ph10 102 yx
1867 nigel 93
1868     /^((?(abc)a|b)(?<abc>x|y))+/
1869     bxay
1870 ph10 102 bxby
1871 nigel 93 ** Failers
1872 ph10 102 axby
1873 nigel 93
1874     /^(((?P=abc)|X)(?<abc>x|y))+/
1875     XxXxxx
1876     XxXyyx
1877     XxXyxx
1878     ** Failers
1879 ph10 102 x
1880 nigel 93
1881     /^(?1)(abc)/
1882     abcabc
1883    
1884     /^(?:(?:\1|X)(a|b))+/
1885     Xaaa
1886 ph10 102 Xaba
1887 nigel 93
1888 ph10 162 /^[\E\Qa\E-\Qz\E]+/BZ
1889 ph10 102
1890 ph10 162 /^[a\Q]bc\E]/BZ
1891 ph10 102
1892 ph10 162 /^[a-\Q\E]/BZ
1893 nigel 93
1894 ph10 162 /^(?P>abc)[()](?<abc>)/BZ
1895 nigel 93
1896 ph10 162 /^((?(abc)y)[()](?P<abc>x))+/BZ
1897 nigel 93 (xy)x
1898    
1899 ph10 162 /^(?P>abc)\Q()\E(?<abc>)/BZ
1900 nigel 93
1901 ph10 162 /^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
1902 ph10 102
1903 nigel 93 /^(?P>abc) # this is (a comment)
1904 ph10 162 (?<abc>)/BZx
1905 nigel 93
1906     /^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
1907     1221
1908     Satan, oscillate my metallic sonatas!
1909     A man, a plan, a canal: Panama!
1910 ph10 102 Able was I ere I saw Elba.
1911 nigel 93 *** Failers
1912 ph10 102 The quick brown fox
1913    
1914 nigel 93 /(?=(\w+))\1:/I
1915     abcd:
1916    
1917     /(?=(?'abc'\w+))\k<abc>:/I
1918     abcd:
1919    
1920     /(?'abc'\w+):\k<abc>{2}/
1921     a:aaxyz
1922     ab:ababxyz
1923     ** Failers
1924 ph10 102 a:axyz
1925     ab:abxyz
1926 nigel 93
1927     /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1928     adaa
1929     ** Failers
1930     addd
1931 ph10 102 adbb
1932 nigel 93
1933     /(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
1934     bdaa
1935     bdab
1936     ** Failers
1937 ph10 102 bddd
1938 nigel 93
1939     /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
1940     abd
1941 ph10 102 ce
1942    
1943 nigel 93 /(?(<bc))/
1944    
1945 ph10 102 /(?(''))/
1946 nigel 93
1947     /(?('R')stuff)/
1948    
1949     /((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x
1950     abcabc1Xabc2XabcXabcabc
1951    
1952     /(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1953     abcabc1Xabc2XabcXabcabc
1954    
1955     /(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1956    
1957     /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1958     abcabc1Xabc2XabcXabcabc
1959    
1960     /^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
1961     abcd
1962 ph10 102
1963 nigel 93 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
1964     (?(DEFINE)
1965     (?<NAME_PAT>[a-z]+)
1966     (?<ADDRESS_PAT>\d+)
1967     )/x
1968     metcalfe 33
1969 ph10 102
1970 nigel 93 /^(?(DEFINE) abc | xyz ) /x
1971 ph10 102
1972 nigel 93 /(?(DEFINE) abc) xyz/xI
1973    
1974     /(?(DEFINE) abc){3} xyz/x
1975    
1976     /(a|)*\d/
1977     \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1978     \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
1979    
1980     /^a.b/<lf>
1981     a\rb
1982 ph10 102 a\nb\<cr>
1983 ph10 149 a\x85b\<anycrlf>
1984 nigel 93 ** Failers
1985     a\nb
1986     a\nb\<any>
1987 ph10 102 a\rb\<cr>
1988     a\rb\<any>
1989 ph10 149 a\x85b\<any>
1990     a\rb\<anycrlf>
1991 nigel 93
1992     /^abc./mgx<any>
1993     abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK
1994    
1995     /abc.$/mgx<any>
1996     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
1997    
1998     /a/<cr><any>
1999    
2000     /a/<any><crlf>
2001    
2002     /^a\Rb/
2003     a\nb
2004     a\rb
2005     a\r\nb
2006     a\x0bb
2007     a\x0cb
2008 ph10 102 a\x85b
2009 nigel 93 ** Failers
2010 ph10 102 a\n\rb
2011 nigel 93
2012     /^a\R*b/
2013     ab
2014     a\nb
2015     a\rb
2016     a\r\nb
2017     a\x0bb
2018     a\x0cb
2019 ph10 102 a\x85b
2020     a\n\rb
2021     a\n\r\x85\x0cb
2022 nigel 93
2023     /^a\R+b/
2024     a\nb
2025     a\rb
2026     a\r\nb
2027     a\x0bb
2028     a\x0cb
2029 ph10 102 a\x85b
2030     a\n\rb
2031     a\n\r\x85\x0cb
2032 nigel 93 ** Failers
2033 ph10 102 ab
2034    
2035 nigel 93 /^a\R{1,3}b/
2036     a\nb
2037     a\n\rb
2038     a\n\r\x85b
2039 ph10 102 a\r\n\r\nb
2040     a\r\n\r\n\r\nb
2041 nigel 93 a\n\r\n\rb
2042 ph10 102 a\n\n\r\nb
2043 nigel 93 ** Failers
2044     a\n\n\n\rb
2045     a\r
2046    
2047     /^a[\R]b/
2048     aRb
2049     ** Failers
2050 ph10 102 a\nb
2051 nigel 93
2052     /(?&abc)X(?<abc>P)/I
2053     abcPXP123
2054    
2055     /(?1)X(?<abc>P)/I
2056     abcPXP123
2057    
2058     /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
2059     1.2.3.4
2060     131.111.10.206
2061     10.0.0.0
2062     ** Failers
2063     10.6
2064 ph10 102 455.3.4.5
2065 nigel 93
2066     /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
2067     1.2.3.4
2068     131.111.10.206
2069     10.0.0.0
2070     ** Failers
2071     10.6
2072 ph10 102 455.3.4.5
2073    
2074 nigel 93 /(?:a(?&abc)b)*(?<abc>x)/
2075     123axbaxbaxbx456
2076     123axbaxbaxb456
2077 ph10 102
2078 nigel 93 /(?:a(?&abc)b){1,5}(?<abc>x)/
2079     123axbaxbaxbx456
2080    
2081     /(?:a(?&abc)b){2,5}(?<abc>x)/
2082     123axbaxbaxbx456
2083    
2084     /(?:a(?&abc)b){2,}(?<abc>x)/
2085     123axbaxbaxbx456
2086    
2087     /(abc)(?i:(?1))/
2088     defabcabcxyz
2089     DEFabcABCXYZ
2090    
2091     /(abc)(?:(?i)(?1))/
2092     defabcabcxyz
2093     DEFabcABCXYZ
2094    
2095     /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
2096     ababababbbabZXXXX
2097    
2098     /^(a)\g-2/
2099    
2100     /^(a)\g/
2101    
2102     /^(a)\g{0}/
2103    
2104     /^(a)\g{3/
2105    
2106     /^(a)\g{4a}/
2107    
2108     /^a.b/<lf>
2109     a\rb
2110     *** Failers
2111     a\nb
2112    
2113     /.+foo/
2114     afoo
2115 ph10 102 ** Failers
2116     \r\nfoo
2117     \nfoo
2118 nigel 93
2119     /.+foo/<crlf>
2120     afoo
2121 ph10 102 \nfoo
2122     ** Failers
2123     \r\nfoo
2124 nigel 93
2125     /.+foo/<any>
2126     afoo
2127 ph10 102 ** Failers
2128     \nfoo
2129     \r\nfoo
2130 nigel 93
2131     /.+foo/s
2132     afoo
2133 ph10 102 \r\nfoo
2134     \nfoo
2135 ph10 131
2136     /^$/mg<any>
2137     abc\r\rxyz
2138     abc\n\rxyz
2139     ** Failers
2140     abc\r\nxyz
2141 nigel 93
2142 ph10 141 /(?m)^$/<any>g+
2143     abc\r\n\r\n
2144    
2145 ph10 143 /(?m)^$|^\r\n/<any>g+
2146     abc\r\n\r\n
2147    
2148     /(?m)$/<any>g+
2149     abc\r\n\r\n
2150    
2151 ph10 149 /abc.$/mgx<anycrlf>
2152     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
2153    
2154 ph10 155 /^X/m
2155     XABC
2156     ** Failers
2157     XABC\B
2158    
2159 nigel 49 / End of testinput2 /

Properties

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12