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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 271 - (hide annotations) (download)
Fri Nov 16 19:58:26 2007 UTC (6 years, 8 months ago) by ph10
File size: 44771 byte(s)
Missed test data for previous change.

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 ph10 178 /ab\idef/X
32 nigel 41
33 ph10 178 /(?X)ab\idef/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     /[a[:xyz:/
402    
403     /(?<=x+)y/
404    
405     /a{37,17}/
406    
407     /abc/\
408    
409     /abc/\P
410    
411     /abc/\i
412    
413 nigel 93 /(a)bc(d)/I
414 nigel 41 abcd
415     abcd\C2
416     abcd\C5
417 ph10 102
418 nigel 93 /(.{20})/I
419 nigel 41 abcdefghijklmnopqrstuvwxyz
420     abcdefghijklmnopqrstuvwxyz\C1
421     abcdefghijklmnopqrstuvwxyz\G1
422 ph10 102
423 nigel 93 /(.{15})/I
424 nigel 41 abcdefghijklmnopqrstuvwxyz
425     abcdefghijklmnopqrstuvwxyz\C1\G1
426    
427 nigel 93 /(.{16})/I
428 nigel 41 abcdefghijklmnopqrstuvwxyz
429     abcdefghijklmnopqrstuvwxyz\C1\G1\L
430 ph10 102
431 nigel 93 /^(a|(bc))de(f)/I
432 ph10 102 adef\G1\G2\G3\G4\L
433     bcdef\G1\G2\G3\G4\L
434     adefghijk\C0
435    
436 nigel 93 /^abc\00def/I
437 ph10 102 abc\00def\L\C0
438    
439     /word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
440     )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
441 ph10 162 )?)?)?)?)?)?)?)?)?otherword/I
442 nigel 41
443 ph10 161 /.*X/IDZ
444 nigel 41
445 ph10 161 /.*X/IDZs
446 nigel 41
447 ph10 161 /(.*X|^B)/IDZ
448 nigel 41
449 ph10 161 /(.*X|^B)/IDZs
450 ph10 102
451 ph10 161 /(?s)(.*X|^B)/IDZ
452 nigel 41
453 ph10 161 /(?s:.*X|^B)/IDZ
454 nigel 41
455 nigel 93 /\Biss\B/I+
456 nigel 41 Mississippi
457    
458 nigel 93 /\Biss\B/I+P
459 nigel 41 Mississippi
460    
461 nigel 93 /iss/IG+
462 nigel 41 Mississippi
463    
464 nigel 93 /\Biss\B/IG+
465 nigel 41 Mississippi
466    
467 nigel 93 /\Biss\B/Ig+
468 nigel 41 Mississippi
469     *** Failers
470     Mississippi\A
471    
472 nigel 93 /(?<=[Ms])iss/Ig+
473 nigel 41 Mississippi
474    
475 nigel 93 /(?<=[Ms])iss/IG+
476 nigel 41 Mississippi
477    
478 nigel 93 /^iss/Ig+
479 nigel 41 ississippi
480 ph10 102
481 nigel 93 /.*iss/Ig+
482 ph10 102 abciss\nxyzisspqr
483 nigel 41
484 nigel 93 /.i./I+g
485 nigel 41 Mississippi
486     Mississippi\A
487     Missouri river
488 ph10 102 Missouri river\A
489 nigel 41
490 nigel 93 /^.is/I+g
491 nigel 41 Mississippi
492    
493 nigel 93 /^ab\n/Ig+
494 nigel 41 ab\nab\ncd
495    
496 nigel 93 /^ab\n/Img+
497 nigel 41 ab\nab\ncd
498    
499 nigel 93 /abc/I
500 nigel 41
501 nigel 93 /abc|bac/I
502 nigel 41
503 nigel 93 /(abc|bac)/I
504 nigel 41
505 nigel 93 /(abc|(c|dc))/I
506 nigel 41
507 nigel 93 /(abc|(d|de)c)/I
508 nigel 41
509 nigel 93 /a*/I
510 nigel 41
511 nigel 93 /a+/I
512 nigel 41
513 nigel 93 /(baa|a+)/I
514 nigel 41
515 nigel 93 /a{0,3}/I
516 nigel 41
517 nigel 93 /baa{3,}/I
518 nigel 41
519 nigel 93 /"([^\\"]+|\\.)*"/I
520 nigel 41
521 nigel 93 /(abc|ab[cd])/I
522 nigel 41
523 nigel 93 /(a|.)/I
524 nigel 41
525 nigel 93 /a|ba|\w/I
526 nigel 41
527 nigel 93 /abc(?=pqr)/I
528 nigel 41
529 nigel 93 /...(?<=abc)/I
530 nigel 41
531 nigel 93 /abc(?!pqr)/I
532 nigel 41
533 nigel 93 /ab./I
534 nigel 41
535 nigel 93 /ab[xyz]/I
536 nigel 41
537 nigel 93 /abc*/I
538 nigel 41
539 nigel 93 /ab.c*/I
540 nigel 41
541 nigel 93 /a.c*/I
542 nigel 41
543 nigel 93 /.c*/I
544 nigel 41
545 nigel 93 /ac*/I
546 nigel 41
547 nigel 93 /(a.c*|b.c*)/I
548 nigel 41
549 nigel 93 /a.c*|aba/I
550 nigel 41
551 nigel 93 /.+a/I
552 nigel 41
553 nigel 93 /(?=abcda)a.*/I
554 nigel 41
555 nigel 93 /(?=a)a.*/I
556 nigel 41
557 nigel 93 /a(b)*/I
558 nigel 41
559 nigel 93 /a\d*/I
560 nigel 41
561 nigel 93 /ab\d*/I
562 nigel 41
563 nigel 93 /a(\d)*/I
564 nigel 41
565 nigel 93 /abcde{0,0}/I
566 nigel 41
567 nigel 93 /ab\d+/I
568 nigel 41
569 ph10 270 /a(?(1)b)(.)/I
570 nigel 41
571 ph10 270 /a(?(1)bag|big)(.)/I
572 nigel 41
573 ph10 270 /a(?(1)bag|big)*(.)/I
574 nigel 41
575 ph10 270 /a(?(1)bag|big)+(.)/I
576 nigel 41
577 ph10 270 /a(?(1)b..|b..)(.)/I
578 nigel 41
579 nigel 93 /ab\d{0}e/I
580 nigel 41
581 nigel 93 /a?b?/I
582 nigel 41 a
583     b
584     ab
585     \
586     *** Failers
587 ph10 102 \N
588    
589 nigel 93 /|-/I
590 nigel 41 abcd
591     -abc
592     \Nab-c
593     *** Failers
594 ph10 102 \Nabc
595 nigel 41
596 nigel 93 /a*(b+)(z)(z)/IP
597 nigel 41 aaaabbbbzzzz
598     aaaabbbbzzzz\O0
599     aaaabbbbzzzz\O1
600     aaaabbbbzzzz\O2
601     aaaabbbbzzzz\O3
602     aaaabbbbzzzz\O4
603     aaaabbbbzzzz\O5
604    
605 ph10 102 /^.?abcd/IS
606    
607 nigel 43 /\( # ( at start
608     (?: # Non-capturing bracket
609     (?>[^()]+) # Either a sequence of non-brackets (no backtracking)
610     | # Or
611     (?R) # Recurse - i.e. nested bracketed string
612     )* # Zero or more contents
613     \) # Closing )
614 nigel 93 /Ix
615 nigel 43 (abcd)
616     (abcd)xyz
617     xyz(abcd)
618 ph10 102 (ab(xy)cd)pqr
619     (ab(xycd)pqr
620     () abc ()
621 nigel 43 12(abcde(fsh)xyz(foo(bar))lmno)89
622     *** Failers
623 ph10 102 abcd
624 nigel 43 abcd)
625 ph10 102 (abcd
626 nigel 43
627 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ixg
628 ph10 102 (ab(xy)cd)pqr
629 nigel 43 1(abcd)(x(y)z)pqr
630    
631 nigel 93 /\( (?: (?>[^()]+) | (?R) ) \) /Ix
632 nigel 43 (abcd)
633     (ab(xy)cd)
634 ph10 102 (a(b(c)d)e)
635     ((ab))
636 nigel 43 *** Failers
637 ph10 102 ()
638 nigel 43
639 nigel 93 /\( (?: (?>[^()]+) | (?R) )? \) /Ix
640 nigel 43 ()
641     12(abcde(fsh)xyz(foo(bar))lmno)89
642    
643 nigel 93 /\( ( (?>[^()]+) | (?R) )* \) /Ix
644 nigel 43 (ab(xy)cd)
645    
646 nigel 93 /\( ( ( (?>[^()]+) | (?R) )* ) \) /Ix
647 nigel 43 (ab(xy)cd)
648    
649 nigel 93 /\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /Ix
650 nigel 43 (ab(xy)cd)
651     (123ab(xy)cd)
652    
653 nigel 93 /\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /Ix
654 nigel 43 (ab(xy)cd)
655     (123ab(xy)cd)
656    
657 nigel 93 /\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /Ix
658 nigel 43 (ab(xy)cd)
659    
660 nigel 93 /\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /Ix
661 nigel 43 (abcd(xyz<p>qrs)123)
662    
663 nigel 93 /\( ( ( (?>[^()]+) | ((?R)) )* ) \) /Ix
664 nigel 43 (ab(cd)ef)
665     (ab(cd(ef)gh)ij)
666    
667 ph10 161 /^[[:alnum:]]/DZ
668 nigel 43
669 ph10 161 /^[[:^alnum:]]/DZ
670 nigel 75
671 ph10 161 /^[[:alpha:]]/DZ
672 nigel 75
673 ph10 161 /^[[:^alpha:]]/DZ
674 ph10 102
675 nigel 87 /[_[:alpha:]]/IS
676    
677 ph10 161 /^[[:ascii:]]/DZ
678 nigel 43
679 ph10 161 /^[[:^ascii:]]/DZ
680 nigel 75
681 ph10 161 /^[[:blank:]]/DZ
682 nigel 63
683 ph10 161 /^[[:^blank:]]/DZ
684 nigel 87
685     /[\n\x0b\x0c\x0d[:blank:]]/IS
686    
687 ph10 161 /^[[:cntrl:]]/DZ
688 nigel 43
689 ph10 161 /^[[:digit:]]/DZ
690 nigel 43
691 ph10 161 /^[[:graph:]]/DZ
692 nigel 43
693 ph10 161 /^[[:lower:]]/DZ
694 nigel 43
695 ph10 161 /^[[:print:]]/DZ
696 nigel 43
697 ph10 161 /^[[:punct:]]/DZ
698 nigel 43
699 ph10 161 /^[[:space:]]/DZ
700 nigel 43
701 ph10 161 /^[[:upper:]]/DZ
702 nigel 43
703 ph10 161 /^[[:xdigit:]]/DZ
704 nigel 43
705 ph10 161 /^[[:word:]]/DZ
706 nigel 43
707 ph10 161 /^[[:^cntrl:]]/DZ
708 nigel 43
709 ph10 161 /^[12[:^digit:]]/DZ
710 nigel 43
711 ph10 161 /^[[:^blank:]]/DZ
712 nigel 63
713 ph10 161 /[01[:alpha:]%]/DZ
714 nigel 43
715 nigel 93 /[[.ch.]]/I
716 nigel 43
717 nigel 93 /[[=ch=]]/I
718 nigel 43
719 nigel 93 /[[:rhubarb:]]/I
720 nigel 43
721 nigel 93 /[[:upper:]]/Ii
722 nigel 43 A
723 ph10 102 a
724    
725 nigel 93 /[[:lower:]]/Ii
726 nigel 43 A
727 ph10 102 a
728 nigel 43
729 nigel 93 /((?-i)[[:lower:]])[[:lower:]]/Ii
730 nigel 43 ab
731     aB
732     *** Failers
733     Ab
734 ph10 102 AB
735 nigel 43
736 nigel 93 /[\200-\110]/I
737 nigel 49
738 nigel 93 /^(?(0)f|b)oo/I
739 nigel 51
740 nigel 93 /This one's here because of the large output vector needed/I
741 nigel 53
742 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+(?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 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
744    
745 nigel 93 /This one's here because Perl does this differently and PCRE can't at present/I
746 nigel 53
747 nigel 93 /(main(O)?)+/I
748 nigel 53 mainmain
749     mainOmain
750 ph10 102
751 nigel 93 /These are all cases where Perl does it differently (nested captures)/I
752 nigel 63
753 nigel 93 /^(a(b)?)+$/I
754 nigel 63 aba
755 ph10 102
756 nigel 93 /^(aa(bb)?)+$/I
757 ph10 102 aabbaa
758    
759 nigel 93 /^(aa|aa(bb))+$/I
760 ph10 102 aabbaa
761    
762 nigel 93 /^(aa(bb)??)+$/I
763 ph10 102 aabbaa
764    
765 nigel 93 /^(?:aa(bb)?)+$/I
766 ph10 102 aabbaa
767    
768 nigel 93 /^(aa(b(b))?)+$/I
769 ph10 102 aabbaa
770 nigel 63
771 nigel 93 /^(?:aa(b(b))?)+$/I
772 ph10 102 aabbaa
773 nigel 63
774 nigel 93 /^(?:aa(b(?:b))?)+$/I
775 ph10 102 aabbaa
776 nigel 63
777 nigel 93 /^(?:aa(bb(?:b))?)+$/I
778 ph10 102 aabbbaa
779    
780 nigel 93 /^(?:aa(b(?:bb))?)+$/I
781 ph10 102 aabbbaa
782 nigel 63
783 nigel 93 /^(?:aa(?:b(b))?)+$/I
784 ph10 102 aabbaa
785 nigel 63
786 nigel 93 /^(?:aa(?:b(bb))?)+$/I
787 ph10 102 aabbbaa
788 nigel 63
789 nigel 93 /^(aa(b(bb))?)+$/I
790 ph10 102 aabbbaa
791 nigel 63
792 nigel 93 /^(aa(bb(bb))?)+$/I
793 ph10 102 aabbbbaa
794 nigel 63
795 ph10 102 /--------------------------------------------------------------------/I
796    
797 ph10 162 /#/IxDZ
798 nigel 63
799 ph10 162 /a#/IxDZ
800 nigel 63
801 ph10 161 /[\s]/DZ
802 nigel 63
803 ph10 161 /[\S]/DZ
804 nigel 63
805 ph10 161 /a(?i)b/DZ
806 nigel 63 ab
807     aB
808 ph10 102 *** Failers
809     AB
810 nigel 63
811 ph10 161 /(a(?i)b)/DZ
812 nigel 63 ab
813     aB
814 ph10 102 *** Failers
815     AB
816    
817 ph10 161 / (?i)abc/IxDZ
818 nigel 63
819     /#this is a comment
820 ph10 161 (?i)abc/IxDZ
821 nigel 63
822 ph10 161 /123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
823 nigel 63
824 ph10 161 /\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/DZ
825 nigel 63
826 ph10 161 /\Q\E/DZ
827 nigel 63 \
828    
829 ph10 161 /\Q\Ex/DZ
830 nigel 63
831 ph10 161 / \Q\E/DZ
832 nigel 63
833 ph10 161 /a\Q\E/DZ
834 nigel 63 abc
835     bca
836 ph10 102 bac
837 nigel 63
838 ph10 161 /a\Q\Eb/DZ
839 nigel 63 abc
840    
841 ph10 161 /\Q\Eabc/DZ
842 nigel 63
843 ph10 161 /x*+\w/DZ
844 nigel 63 *** Failers
845     xxxxx
846 ph10 102
847 ph10 161 /x?+/DZ
848 nigel 63
849 ph10 161 /x++/DZ
850 nigel 63
851 ph10 161 /x{1,3}+/DZ
852 nigel 63
853 ph10 161 /(x)*+/DZ
854 nigel 63
855 nigel 93 /^(\w++|\s++)*$/I
856 nigel 63 now is the time for all good men to come to the aid of the party
857     *** Failers
858     this is not a line with only words and spaces!
859 ph10 102
860 nigel 93 /(\d++)(\w)/I
861 nigel 63 12345a
862     *** Failers
863 ph10 102 12345+
864 nigel 63
865 nigel 93 /a++b/I
866 nigel 63 aaab
867    
868 nigel 93 /(a++b)/I
869 nigel 63 aaab
870    
871 nigel 93 /(a++)b/I
872 nigel 63 aaab
873    
874 nigel 93 /([^()]++|\([^()]*\))+/I
875 nigel 63 ((abc(ade)ufh()()x
876 ph10 102
877     /\(([^()]++|\([^()]+\))+\)/I
878 nigel 63 (abc)
879     (abc(def)xyz)
880     *** Failers
881 ph10 102 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
882 nigel 63
883 ph10 161 /(abc){1,3}+/DZ
884 nigel 63
885 nigel 93 /a+?+/I
886 nigel 63
887 nigel 93 /a{2,3}?+b/I
888 nigel 63
889 nigel 93 /(?U)a+?+/I
890 nigel 63
891 nigel 93 /a{2,3}?+b/IU
892 nigel 63
893 ph10 161 /x(?U)a++b/DZ
894 nigel 63 xaaaab
895    
896 ph10 161 /(?U)xa++b/DZ
897 nigel 63 xaaaab
898    
899 ph10 161 /^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/DZ
900 nigel 63
901 ph10 161 /^x(?U)a+b/DZ
902 nigel 63
903 ph10 161 /^x(?U)(a+)b/DZ
904 nigel 63
905 nigel 93 /[.x.]/I
906 nigel 63
907 nigel 93 /[=x=]/I
908 nigel 63
909 nigel 93 /[:x:]/I
910 nigel 63
911 nigel 93 /\l/I
912 nigel 63
913 nigel 93 /\L/I
914 nigel 63
915 nigel 93 /\N{name}/I
916 nigel 63
917 nigel 93 /\u/I
918 nigel 63
919 nigel 93 /\U/I
920 nigel 63
921 nigel 93 /[/I
922 nigel 63
923 nigel 93 /[a-/I
924 nigel 63
925 nigel 93 /[[:space:]/I
926 nigel 63
927 ph10 162 /[\s]/IDZ
928 nigel 63
929 ph10 162 /[[:space:]]/IDZ
930 nigel 63
931 ph10 162 /[[:space:]abcde]/IDZ
932 nigel 63
933 nigel 93 /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/Ix
934 nigel 63 <>
935     <abcd>
936     <abc <123> hij>
937     <abc <def> hij>
938 ph10 102 <abc<>def>
939     <abc<>
940 nigel 63 *** Failers
941     <abc
942    
943 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
944 nigel 63
945 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
946 nigel 63
947     /(.*)\d+\1/I
948    
949     /(.*)\d+/I
950 ph10 102
951 nigel 63 /(.*)\d+\1/Is
952    
953     /(.*)\d+/Is
954    
955     /(.*(xyz))\d+\2/I
956    
957     /((.*))\d+\1/I
958     abc123bc
959 ph10 102
960 nigel 63 /a[b]/I
961    
962     /(?=a).*/I
963    
964 nigel 93 /(?=abc).xyz/IiI
965 nigel 63
966     /(?=abc)(?i).xyz/I
967    
968     /(?=a)(?=b)/I
969    
970     /(?=.)a/I
971    
972     /((?=abcda)a)/I
973    
974     /((?=abcda)ab)/I
975    
976     /()a/I
977    
978 ph10 270 /(?(1)ab|ac)(.)/I
979 nigel 63
980 ph10 270 /(?(1)abz|acz)(.)/I
981 nigel 63
982 ph10 270 /(?(1)abz)(.)/I
983 nigel 63
984 ph10 270 /(?(1)abz)(1)23/I
985 nigel 63
986     /(a)+/I
987    
988     /(a){2,3}/I
989    
990     /(a)*/I
991    
992     /[a]/I
993    
994     /[ab]/I
995    
996     /[ab]/IS
997    
998     /[^a]/I
999    
1000     /\d456/I
1001    
1002     /\d456/IS
1003    
1004     /a^b/I
1005    
1006 nigel 93 /^a/Im
1007 nigel 63 abcde
1008 ph10 102 xy\nabc
1009     *** Failers
1010     xyabc
1011 nigel 63
1012     /c|abc/I
1013    
1014     /(?i)[ab]/IS
1015    
1016     /[ab](?i)cd/IS
1017    
1018 nigel 93 /abc(?C)def/I
1019 nigel 63 abcdef
1020 ph10 102 1234abcdef
1021 nigel 63 *** Failers
1022     abcxyz
1023 ph10 102 abcxyzf
1024 nigel 63
1025 nigel 93 /abc(?C)de(?C1)f/I
1026 nigel 63 123abcdef
1027 ph10 102
1028     /(?C1)\dabc(?C2)def/I
1029 nigel 63 1234abcdef
1030     *** Failers
1031 ph10 102 abcdef
1032    
1033 nigel 93 /(?C255)ab/I
1034 nigel 63
1035 nigel 93 /(?C256)ab/I
1036 nigel 63
1037 ph10 102 /(?Cab)xx/I
1038 nigel 63
1039 nigel 93 /(?C12vr)x/I
1040 nigel 63
1041 nigel 93 /abc(?C)def/I
1042 nigel 63 *** Failers
1043     \x83\x0\x61bcdef
1044    
1045 nigel 93 /(abc)(?C)de(?C1)f/I
1046 nigel 63 123abcdef
1047 ph10 102 123abcdef\C+
1048     123abcdef\C-
1049 nigel 63 *** Failers
1050 ph10 102 123abcdef\C!1
1051    
1052 nigel 93 /(?C0)(abc(?C1))*/I
1053 nigel 63 abcabcabc
1054 ph10 102 abcabc\C!1!3
1055 nigel 63 *** Failers
1056 ph10 102 abcabcabc\C!1!3
1057 nigel 63
1058 nigel 93 /(\d{3}(?C))*/I
1059 nigel 63 123\C+
1060     123456\C+
1061 ph10 102 123456789\C+
1062 nigel 63
1063 nigel 93 /((xyz)(?C)p|(?C1)xyzabc)/I
1064 nigel 63 xyzabc\C+
1065    
1066 nigel 93 /(X)((xyz)(?C)p|(?C1)xyzabc)/I
1067 nigel 63 Xxyzabc\C+
1068    
1069 nigel 93 /(?=(abc))(?C)abcdef/I
1070 nigel 63 abcdef\C+
1071 ph10 102
1072 nigel 93 /(?!(abc)(?C1)d)(?C2)abcxyz/I
1073 ph10 102 abcxyz\C+
1074 nigel 63
1075 nigel 93 /(?<=(abc)(?C))xyz/I
1076 nigel 63 abcxyz\C+
1077 ph10 102
1078 nigel 93 /a(b+)(c*)(?C1)/I
1079 nigel 77 abbbbbccc\C*1
1080    
1081 nigel 93 /a(b+?)(c*?)(?C1)/I
1082 nigel 77 abbbbbccc\C*1
1083 nigel 63
1084 ph10 102 /(?C)abc/I
1085    
1086 nigel 93 /(?C)^abc/I
1087 nigel 63
1088 nigel 93 /(?C)a|b/IS
1089 nigel 63
1090 nigel 93 /(?R)/I
1091 nigel 63
1092 nigel 93 /(a|(?R))/I
1093 nigel 63
1094 nigel 93 /(ab|(bc|(de|(?R))))/I
1095 nigel 63
1096 nigel 93 /x(ab|(bc|(de|(?R))))/I
1097 nigel 63 xab
1098     xbc
1099     xde
1100     xxab
1101     xxxab
1102     *** Failers
1103 ph10 102 xyab
1104 nigel 63
1105 nigel 93 /(ab|(bc|(de|(?1))))/I
1106 nigel 63
1107 nigel 93 /x(ab|(bc|(de|(?1)x)x)x)/I
1108 nigel 63
1109 nigel 93 /^([^()]|\((?1)*\))*$/I
1110 nigel 63 abc
1111     a(b)c
1112 ph10 102 a(b(c))d
1113 nigel 63 *** Failers)
1114 ph10 102 a(b(c)d
1115 nigel 63
1116 nigel 93 /^>abc>([^()]|\((?1)*\))*<xyz<$/I
1117 nigel 63 >abc>123<xyz<
1118     >abc>1(2)3<xyz<
1119     >abc>(1(2)3)<xyz<
1120    
1121 ph10 161 /(a(?1)b)/DZ
1122 nigel 63
1123 ph10 161 /(a(?1)+b)/DZ
1124 nigel 63
1125 nigel 93 /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii
1126 nigel 63 1221
1127     Satan, oscillate my metallic sonatas!
1128     A man, a plan, a canal: Panama!
1129 ph10 102 Able was I ere I saw Elba.
1130 nigel 63 *** Failers
1131 ph10 102 The quick brown fox
1132    
1133 nigel 93 /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1134 nigel 63 12
1135     (((2+2)*-3)-7)
1136     -12
1137     *** Failers
1138     ((2+2)*-3)-7)
1139 ph10 102
1140 nigel 93 /^(x(y|(?1){2})z)/I
1141 nigel 63 xyz
1142 ph10 102 xxyzxyzz
1143 nigel 63 *** Failers
1144     xxyzz
1145 ph10 102 xxyzxyzxyzz
1146 nigel 63
1147 nigel 93 /((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/Ix
1148 nigel 63 <>
1149     <abcd>
1150     <abc <123> hij>
1151     <abc <def> hij>
1152 ph10 102 <abc<>def>
1153     <abc<>
1154 nigel 63 *** Failers
1155     <abc
1156    
1157 nigel 93 /(?1)/I
1158 nigel 63
1159 nigel 93 /((?2)(abc)/I
1160 nigel 63
1161 nigel 93 /^(abc)def(?1)/I
1162 nigel 63 abcdefabc
1163    
1164 nigel 93 /^(a|b|c)=(?1)+/I
1165 nigel 63 a=a
1166     a=b
1167 ph10 102 a=bc
1168 nigel 63
1169 nigel 93 /^(a|b|c)=((?1))+/I
1170 nigel 63 a=a
1171     a=b
1172 ph10 102 a=bc
1173 nigel 63
1174 ph10 161 /a(?P<name1>b|c)d(?P<longername2>e)/DZ
1175 nigel 63 abde
1176 ph10 102 acde
1177 nigel 63
1178 ph10 161 /(?:a(?P<c>c(?P<d>d)))(?P<a>a)/DZ
1179 nigel 63
1180 ph10 161 /(?P<a>a)...(?P=a)bbb(?P>a)d/DZ
1181 nigel 63
1182 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
1183 nigel 63 1221
1184     Satan, oscillate my metallic sonatas!
1185     A man, a plan, a canal: Panama!
1186 ph10 102 Able was I ere I saw Elba.
1187 nigel 63 *** Failers
1188 ph10 102 The quick brown fox
1189    
1190 nigel 93 /((?(R)a|b))\1(?1)?/I
1191 nigel 63 bb
1192 ph10 102 bbaa
1193 nigel 63
1194 nigel 93 /(.*)a/Is
1195 nigel 63
1196 nigel 93 /(.*)a\1/Is
1197 nigel 63
1198 nigel 93 /(.*)a(b)\2/Is
1199 nigel 63
1200 nigel 93 /((.*)a|(.*)b)z/Is
1201 nigel 63
1202 nigel 93 /((.*)a|(.*)b)z\1/Is
1203 nigel 63
1204 nigel 93 /((.*)a|(.*)b)z\2/Is
1205 nigel 63
1206 nigel 93 /((.*)a|(.*)b)z\3/Is
1207 nigel 63
1208 nigel 93 /((.*)a|^(.*)b)z\3/Is
1209 nigel 63
1210 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/Is
1211 nigel 63
1212 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/Is
1213 nigel 63
1214 nigel 93 /(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/Is
1215 nigel 63
1216 ph10 161 /(a)(bc)/INDZ
1217 nigel 63 abc
1218    
1219 ph10 161 /(?P<one>a)(bc)/INDZ
1220 nigel 63 abc
1221    
1222 ph10 161 /(a)(?P<named>bc)/INDZ
1223 nigel 63
1224 nigel 93 /(a+)*zz/I
1225 nigel 63 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1226     aaaaaaaaaaaaaz\M
1227    
1228 nigel 93 /(aaa(?C1)bbb|ab)/I
1229 nigel 63 aaabbb
1230     aaabbb\C*0
1231     aaabbb\C*1
1232     aaabbb\C*-1
1233    
1234 nigel 93 /ab(?P<one>cd)ef(?P<two>gh)/I
1235 nigel 63 abcdefgh
1236     abcdefgh\C1\Gtwo
1237     abcdefgh\Cone\Ctwo
1238 ph10 102 abcdefgh\Cthree
1239 nigel 63
1240 ph10 161 /(?P<Tes>)(?P<Test>)/DZ
1241 nigel 63
1242 ph10 161 /(?P<Test>)(?P<Tes>)/DZ
1243 nigel 63
1244 nigel 93 /(?P<Z>zz)(?P<A>aa)/I
1245 nigel 63 zzaa\CZ
1246     zzaa\CA
1247    
1248 nigel 93 /(?P<x>eks)(?P<x>eccs)/I
1249 nigel 65
1250 nigel 93 /(?P<abc>abc(?P<def>def)(?P<abc>xyz))/I
1251 nigel 65
1252 nigel 93 "\[((?P<elem>\d+)(,(?P>elem))*)\]"I
1253 nigel 73 [10,20,30,5,5,4,4,2,43,23,4234]
1254     *** Failers
1255 ph10 102 []
1256 nigel 73
1257 nigel 93 "\[((?P<elem>\d+)(,(?P>elem))*)?\]"I
1258 nigel 73 [10,20,30,5,5,4,4,2,43,23,4234]
1259 ph10 102 []
1260 nigel 73
1261 ph10 161 /(a(b(?2)c))?/DZ
1262 nigel 73
1263 ph10 161 /(a(b(?2)c))*/DZ
1264 nigel 73
1265 ph10 161 /(a(b(?2)c)){0,2}/DZ
1266 nigel 73
1267 ph10 161 /[ab]{1}+/DZ
1268 nigel 73
1269 nigel 93 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/Ii
1270 nigel 73 Baby Bjorn Active Carrier - With free SHIPPING!!
1271    
1272 nigel 93 /((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/IiS
1273 nigel 73 Baby Bjorn Active Carrier - With free SHIPPING!!
1274 ph10 102
1275 ph10 161 /a*.*b/ISDZ
1276 nigel 73
1277 ph10 161 /(a|b)*.?c/ISDZ
1278 nigel 73
1279 ph10 161 /abc(?C255)de(?C)f/DZ
1280 nigel 75
1281 ph10 161 /abcde/ICDZ
1282 nigel 75 abcde
1283 ph10 102 abcdfe
1284    
1285 ph10 161 /a*b/ICDZ
1286 nigel 75 ab
1287     aaaab
1288 ph10 102 aaaacb
1289 nigel 75
1290 ph10 161 /a+b/ICDZ
1291 nigel 75 ab
1292     aaaab
1293 ph10 102 aaaacb
1294 nigel 75
1295 ph10 161 /(abc|def)x/ICDZ
1296 nigel 75 abcx
1297     defx
1298     abcdefzx
1299    
1300 nigel 93 /(ab|cd){3,4}/IC
1301 nigel 75 ababab
1302     abcdabcd
1303 ph10 102 abcdcdcdcdcd
1304 nigel 75
1305 ph10 161 /([ab]{,4}c|xy)/ICDZ
1306 nigel 75 Note: that { does NOT introduce a quantifier
1307    
1308 ph10 161 /([ab]{1,4}c|xy){4,5}?123/ICDZ
1309 nigel 75 aacaacaacaacaac123
1310    
1311     /\b.*/I
1312     ab cd\>1
1313 ph10 102
1314     /\b.*/Is
1315 nigel 75 ab cd\>1
1316 ph10 102
1317 nigel 75 /(?!.bcd).*/I
1318 ph10 102 Xbcd12345
1319 nigel 75
1320 nigel 93 /abcde/I
1321 nigel 75 ab\P
1322     abc\P
1323     abcd\P
1324 ph10 102 abcde\P
1325 nigel 75 the quick brown abc\P
1326     ** Failers\P
1327     the quick brown abxyz fox\P
1328 ph10 102
1329 nigel 93 "^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"I
1330 nigel 75 13/05/04\P
1331     13/5/2004\P
1332 ph10 102 02/05/09\P
1333 nigel 75 1\P
1334     1/2\P
1335     1/2/0\P
1336 ph10 102 1/2/04\P
1337 nigel 75 0\P
1338     02/\P
1339 ph10 102 02/0\P
1340 nigel 75 02/1\P
1341     ** Failers\P
1342     \P
1343     123\P
1344     33/4/04\P
1345     3/13/04\P
1346     0/1/2003\P
1347 ph10 102 0/\P
1348     02/0/\P
1349     02/13\P
1350 nigel 75
1351     /0{0,2}ABC/I
1352 ph10 102
1353 nigel 75 /\d{3,}ABC/I
1354 ph10 102
1355 nigel 75 /\d*ABC/I
1356    
1357     /[abc]+DE/I
1358    
1359 nigel 93 /[abc]?123/I
1360 nigel 75 123\P
1361     a\P
1362     b\P
1363     c\P
1364     c12\P
1365 ph10 102 c123\P
1366 nigel 75
1367 nigel 93 /^(?:\d){3,5}X/I
1368 nigel 75 1\P
1369     123\P
1370     123X
1371     1234\P
1372     1234X
1373     12345\P
1374 ph10 102 12345X
1375     *** Failers
1376     1X
1377     123456\P
1378 nigel 75
1379 nigel 93 /abc/I>testsavedregex
1380 nigel 75 <testsavedregex
1381     abc
1382     ** Failers
1383     bca
1384 ph10 102
1385 nigel 93 /abc/IF>testsavedregex
1386 nigel 75 <testsavedregex
1387     abc
1388     ** Failers
1389     bca
1390    
1391 nigel 93 /(a|b)/IS>testsavedregex
1392 nigel 75 <testsavedregex
1393     abc
1394     ** Failers
1395 ph10 102 def
1396    
1397 nigel 93 /(a|b)/ISF>testsavedregex
1398 nigel 75 <testsavedregex
1399     abc
1400     ** Failers
1401 ph10 102 def
1402    
1403 nigel 93 ~<(\w+)/?>(.)*</(\1)>~smgI
1404 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>
1405    
1406     /^a/IF
1407    
1408 nigel 93 /line\nbreak/I
1409 nigel 77 this is a line\nbreak
1410 ph10 102 line one\nthis is a line\nbreak in the second line
1411 nigel 77
1412 nigel 93 /line\nbreak/If
1413 nigel 77 this is a line\nbreak
1414 ph10 102 ** Failers
1415     line one\nthis is a line\nbreak in the second line
1416 nigel 77
1417 nigel 93 /line\nbreak/Imf
1418 nigel 77 this is a line\nbreak
1419 ph10 102 ** Failers
1420     line one\nthis is a line\nbreak in the second line
1421 nigel 77
1422 nigel 93 /ab.cd/IP
1423 nigel 77 ab-cd
1424 ph10 102 ab=cd
1425 nigel 77 ** Failers
1426     ab\ncd
1427    
1428 nigel 93 /ab.cd/IPs
1429 nigel 77 ab-cd
1430 ph10 102 ab=cd
1431 nigel 77 ab\ncd
1432    
1433 nigel 93 /(?i)(?-i)AbCd/I
1434 nigel 79 AbCd
1435     ** Failers
1436 ph10 102 abcd
1437    
1438 nigel 93 /a{11111111111111111111}/I
1439 nigel 79
1440 nigel 93 /(){64294967295}/I
1441 nigel 81
1442 nigel 93 /(){2,4294967295}/I
1443 nigel 81
1444 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
1445 nigel 81 abcdefghijklAkB
1446    
1447 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
1448 nigel 81 abcdefghijklAkB
1449    
1450 nigel 93 "(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)A\11B"I
1451 nigel 81 abcdefghijklAkB
1452    
1453 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
1454 nigel 81 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1455    
1456 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
1457 nigel 81 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1458    
1459 nigel 93 /[^()]*(?:\((?R)\)[^()]*)*/I
1460 nigel 87 (this(and)that
1461 ph10 102 (this(and)that)
1462 nigel 87 (this(and)that)stuff
1463    
1464 nigel 93 /[^()]*(?:\((?>(?R))\)[^()]*)*/I
1465 nigel 87 (this(and)that
1466 ph10 102 (this(and)that)
1467    
1468 nigel 93 /[^()]*(?:\((?R)\))*[^()]*/I
1469 nigel 87 (this(and)that
1470 ph10 102 (this(and)that)
1471 nigel 87
1472 nigel 93 /(?:\((?R)\))*[^()]*/I
1473 nigel 87 (this(and)that
1474 ph10 102 (this(and)that)
1475     ((this))
1476 nigel 87
1477 nigel 93 /(?:\((?R)\))|[^()]*/I
1478 nigel 87 (this(and)that
1479 ph10 102 (this(and)that)
1480 nigel 87 (this)
1481 ph10 102 ((this))
1482    
1483 nigel 93 /a(b)c/IPN
1484 nigel 87 abc
1485 ph10 102
1486 nigel 93 /a(?P<name>b)c/IPN
1487 ph10 102 abc
1488 nigel 87
1489 ph10 102 /\x{100}/I
1490    
1491 nigel 93 /\x{0000ff}/I
1492 nigel 87
1493 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/I
1494 nigel 91
1495 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/IJ
1496 nigel 91 a1b\CA
1497 ph10 102 a2b\CA
1498 nigel 91 ** Failers
1499 ph10 102 a1b\CZ\CA
1500    
1501 nigel 93 /^(?P<A>a)(?P<A>b)/IJ
1502 nigel 91 ab\CA
1503 ph10 102
1504 nigel 93 /^(?P<A>a)(?P<A>b)|cd/IJ
1505 nigel 91 ab\CA
1506 ph10 102 cd\CA
1507    
1508 nigel 93 /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1509 ph10 102 cdefgh\CA
1510    
1511 nigel 93 /^((?P<A>a1)|(?P<A>a2)b)/IJ
1512 nigel 91 a1b\GA
1513 ph10 102 a2b\GA
1514 nigel 91 ** Failers
1515 ph10 102 a1b\GZ\GA
1516    
1517 nigel 93 /^(?P<A>a)(?P<A>b)/IJ
1518 nigel 91 ab\GA
1519 ph10 102
1520 nigel 93 /^(?P<A>a)(?P<A>b)|cd/IJ
1521 nigel 91 ab\GA
1522 ph10 102 cd\GA
1523    
1524 nigel 93 /^(?P<A>a)(?P<A>b)|cd(?P<A>ef)(?P<A>gh)/IJ
1525 ph10 102 cdefgh\GA
1526    
1527 nigel 93 /(?J)^((?P<A>a1)|(?P<A>a2)b)/I
1528 nigel 91 a1b\CA
1529 ph10 102 a2b\CA
1530    
1531 nigel 93 /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<A>d)/I
1532 nigel 91
1533     / In this next test, J is not set at the outer level; consequently it isn't
1534 ph10 102 set in the pattern's options; consequently pcre_get_named_substring() produces
1535 nigel 93 a random value. /Ix
1536 nigel 91
1537 nigel 93 /^(?P<A>a) (?J:(?P<B>b)(?P<B>c)) (?P<C>d)/I
1538 nigel 91 a bc d\CA\CB\CC
1539    
1540 nigel 93 /^(?P<A>a)?(?(A)a|b)/I
1541 nigel 91 aabc
1542     bc
1543     ** Failers
1544 ph10 102 abc
1545 nigel 91
1546 nigel 93 /(?:(?(ZZ)a|b)(?P<ZZ>X))+/I
1547 nigel 91 bXaX
1548    
1549 nigel 93 /(?:(?(2y)a|b)(X))+/I
1550 nigel 91
1551 nigel 93 /(?:(?(ZA)a|b)(?P<ZZ>X))+/I
1552 nigel 91
1553 nigel 93 /(?:(?(ZZ)a|b)(?(ZZ)a|b)(?P<ZZ>X))+/I
1554 nigel 91 bbXaaX
1555    
1556 nigel 93 /(?:(?(ZZ)a|\(b\))\\(?P<ZZ>X))+/I
1557 nigel 91 (b)\\Xa\\X
1558    
1559 nigel 93 /(?P<ABC/I
1560 nigel 91
1561 nigel 93 /(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1562 nigel 91 bXXaYYaY
1563 ph10 102 bXYaXXaX
1564 nigel 91
1565 nigel 93 /()()()()()()()()()(?:(?(A)(?P=A)a|b)(?P<A>X|Y))+/I
1566 nigel 91 bXXaYYaY
1567    
1568 nigel 93 /\777/I
1569 nigel 91
1570 nigel 93 /\s*,\s*/IS
1571 nigel 91 \x0b,\x0b
1572 ph10 102 \x0c,\x0d
1573 nigel 91
1574 nigel 93 /^abc/Im
1575 nigel 91 xyz\nabc
1576     xyz\nabc\<lf>
1577     xyz\r\nabc\<lf>
1578     xyz\rabc\<cr>
1579     xyz\r\nabc\<crlf>
1580 ph10 102 ** Failers
1581 nigel 91 xyz\nabc\<cr>
1582     xyz\r\nabc\<cr>
1583     xyz\nabc\<crlf>
1584     xyz\rabc\<crlf>
1585     xyz\rabc\<lf>
1586 ph10 102
1587 nigel 93 /abc$/Im<lf>
1588 nigel 91 xyzabc
1589 ph10 102 xyzabc\n
1590     xyzabc\npqr
1591     xyzabc\r\<cr>
1592     xyzabc\rpqr\<cr>
1593     xyzabc\r\n\<crlf>
1594     xyzabc\r\npqr\<crlf>
1595 nigel 91 ** Failers
1596 ph10 102 xyzabc\r
1597     xyzabc\rpqr
1598     xyzabc\r\n
1599     xyzabc\r\npqr
1600    
1601 nigel 93 /^abc/Im<cr>
1602 nigel 91 xyz\rabcdef
1603     xyz\nabcdef\<lf>
1604 ph10 102 ** Failers
1605 nigel 91 xyz\nabcdef
1606 ph10 102
1607 nigel 93 /^abc/Im<lf>
1608 nigel 91 xyz\nabcdef
1609     xyz\rabcdef\<cr>
1610 ph10 102 ** Failers
1611 nigel 91 xyz\rabcdef
1612 ph10 102
1613 nigel 93 /^abc/Im<crlf>
1614 nigel 91 xyz\r\nabcdef
1615     xyz\rabcdef\<cr>
1616 ph10 102 ** Failers
1617 nigel 91 xyz\rabcdef
1618 ph10 102
1619 nigel 93 /^abc/Im<bad>
1620 nigel 91
1621 nigel 93 /abc/I
1622 nigel 91 xyz\rabc\<bad>
1623 ph10 102 abc
1624    
1625 nigel 93 /.*/I<lf>
1626 nigel 91 abc\ndef
1627     abc\rdef
1628     abc\r\ndef
1629     \<cr>abc\ndef
1630     \<cr>abc\rdef
1631     \<cr>abc\r\ndef
1632     \<crlf>abc\ndef
1633     \<crlf>abc\rdef
1634     \<crlf>abc\r\ndef
1635    
1636 nigel 93 /\w+(.)(.)?def/Is
1637 nigel 91 abc\ndef
1638     abc\rdef
1639     abc\r\ndef
1640    
1641 nigel 93 +((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)+I
1642 nigel 91 /* this is a C style comment */\M
1643    
1644 nigel 93 /(?P<B>25[0-5]|2[0-4]\d|[01]?\d?\d)(?:\.(?P>B)){3}/I
1645 nigel 91
1646 nigel 93 /()()()()()()()()()()()()()()()()()()()()
1647     ()()()()()()()()()()()()()()()()()()()()
1648     ()()()()()()()()()()()()()()()()()()()()
1649     ()()()()()()()()()()()()()()()()()()()()
1650     ()()()()()()()()()()()()()()()()()()()()
1651     (.(.))/Ix
1652 ph10 102 XY\O400
1653 nigel 93
1654     /(a*b|(?i:c*(?-i)d))/IS
1655    
1656     /()[ab]xyz/IS
1657    
1658     /(|)[ab]xyz/IS
1659    
1660     /(|c)[ab]xyz/IS
1661    
1662     /(|c?)[ab]xyz/IS
1663    
1664     /(d?|c?)[ab]xyz/IS
1665    
1666     /(d?|c)[ab]xyz/IS
1667    
1668 ph10 161 /^a*b\d/DZ
1669 nigel 93
1670 ph10 161 /^a*+b\d/DZ
1671 nigel 93
1672 ph10 161 /^a*?b\d/DZ
1673 nigel 93
1674 ph10 161 /^a+A\d/DZ
1675 nigel 93 aaaA5
1676     ** Failers
1677 ph10 102 aaaa5
1678 nigel 93
1679 ph10 161 /^a*A\d/IiDZ
1680 nigel 93 aaaA5
1681     aaaa5
1682    
1683     /(a*|b*)[cd]/IS
1684    
1685     /(a+|b*)[cd]/IS
1686    
1687     /(a*|b+)[cd]/IS
1688    
1689     /(a+|b+)[cd]/IS
1690    
1691     /((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1692     ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
1693     (((
1694     a
1695     ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1696     ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
1697 ph10 102 )))
1698     /Ix
1699 nigel 93 large nest
1700    
1701 ph10 162 /a*\d/BZ
1702 nigel 93
1703 ph10 162 /a*\D/BZ
1704 nigel 93
1705 ph10 162 /0*\d/BZ
1706 nigel 93
1707 ph10 162 /0*\D/BZ
1708 nigel 93
1709 ph10 162 /a*\s/BZ
1710 nigel 93
1711 ph10 162 /a*\S/BZ
1712 nigel 93
1713 ph10 162 / *\s/BZ
1714 nigel 93
1715 ph10 162 / *\S/BZ
1716 nigel 93
1717 ph10 162 /a*\w/BZ
1718 nigel 93
1719 ph10 162 /a*\W/BZ
1720 nigel 93
1721 ph10 162 /=*\w/BZ
1722 nigel 93
1723 ph10 162 /=*\W/BZ
1724 nigel 93
1725 ph10 162 /\d*a/BZ
1726 nigel 93
1727 ph10 162 /\d*2/BZ
1728 nigel 93
1729 ph10 162 /\d*\d/BZ
1730 nigel 93
1731 ph10 162 /\d*\D/BZ
1732 nigel 93
1733 ph10 162 /\d*\s/BZ
1734 nigel 93
1735 ph10 162 /\d*\S/BZ
1736 nigel 93
1737 ph10 162 /\d*\w/BZ
1738 nigel 93
1739 ph10 162 /\d*\W/BZ
1740 nigel 93
1741 ph10 162 /\D*a/BZ
1742 nigel 93
1743 ph10 162 /\D*2/BZ
1744 nigel 93
1745 ph10 162 /\D*\d/BZ
1746 nigel 93
1747 ph10 162 /\D*\D/BZ
1748 nigel 93
1749 ph10 162 /\D*\s/BZ
1750 nigel 93
1751 ph10 162 /\D*\S/BZ
1752 nigel 93
1753 ph10 162 /\D*\w/BZ
1754 nigel 93
1755 ph10 162 /\D*\W/BZ
1756 nigel 93
1757 ph10 162 /\s*a/BZ
1758 nigel 93
1759 ph10 162 /\s*2/BZ
1760 nigel 93
1761 ph10 162 /\s*\d/BZ
1762 nigel 93
1763 ph10 162 /\s*\D/BZ
1764 nigel 93
1765 ph10 162 /\s*\s/BZ
1766 nigel 93
1767 ph10 162 /\s*\S/BZ
1768 nigel 93
1769 ph10 162 /\s*\w/BZ
1770 nigel 93
1771 ph10 162 /\s*\W/BZ
1772 nigel 93
1773 ph10 162 /\S*a/BZ
1774 nigel 93
1775 ph10 162 /\S*2/BZ
1776 nigel 93
1777 ph10 162 /\S*\d/BZ
1778 nigel 93
1779 ph10 162 /\S*\D/BZ
1780 nigel 93
1781 ph10 162 /\S*\s/BZ
1782 nigel 93
1783 ph10 162 /\S*\S/BZ
1784 nigel 93
1785 ph10 162 /\S*\w/BZ
1786 nigel 93
1787 ph10 162 /\S*\W/BZ
1788 nigel 93
1789 ph10 162 /\w*a/BZ
1790 nigel 93
1791 ph10 162 /\w*2/BZ
1792 nigel 93
1793 ph10 162 /\w*\d/BZ
1794 nigel 93
1795 ph10 162 /\w*\D/BZ
1796 nigel 93
1797 ph10 162 /\w*\s/BZ
1798 nigel 93
1799 ph10 162 /\w*\S/BZ
1800 nigel 93
1801 ph10 162 /\w*\w/BZ
1802 nigel 93
1803 ph10 162 /\w*\W/BZ
1804 nigel 93
1805 ph10 162 /\W*a/BZ
1806 nigel 93
1807 ph10 162 /\W*2/BZ
1808 nigel 93
1809 ph10 162 /\W*\d/BZ
1810 nigel 93
1811 ph10 162 /\W*\D/BZ
1812 nigel 93
1813 ph10 162 /\W*\s/BZ
1814 nigel 93
1815 ph10 162 /\W*\S/BZ
1816 nigel 93
1817 ph10 162 /\W*\w/BZ
1818 nigel 93
1819 ph10 162 /\W*\W/BZ
1820 nigel 93
1821 ph10 162 /[^a]+a/BZ
1822 nigel 93
1823 ph10 162 /[^a]+a/BZi
1824 nigel 93
1825 ph10 162 /[^a]+A/BZi
1826 nigel 93
1827 ph10 162 /[^a]+b/BZ
1828 nigel 93
1829 ph10 162 /[^a]+\d/BZ
1830 nigel 93
1831 ph10 162 /a*[^a]/BZ
1832 nigel 93
1833     /(?P<abc>x)(?P<xyz>y)/I
1834     xy\Cabc\Cxyz
1835    
1836     /(?<abc>x)(?'xyz'y)/I
1837     xy\Cabc\Cxyz
1838    
1839     /(?<abc'x)(?'xyz'y)/I
1840    
1841     /(?<abc>x)(?'xyz>y)/I
1842    
1843     /(?P'abc'x)(?P<xyz>y)/I
1844    
1845     /^(?:(?(ZZ)a|b)(?<ZZ>X))+/
1846     bXaX
1847     bXbX
1848     ** Failers
1849 ph10 102 aXaX
1850     aXbX
1851 nigel 93
1852     /^(?P>abc)(?<abcd>xxx)/
1853    
1854     /^(?P>abc)(?<abc>x|y)/
1855     xx
1856     xy
1857     yy
1858 ph10 102 yx
1859 nigel 93
1860     /^(?P>abc)(?P<abc>x|y)/
1861     xx
1862     xy
1863     yy
1864 ph10 102 yx
1865 nigel 93
1866     /^((?(abc)a|b)(?<abc>x|y))+/
1867     bxay
1868 ph10 102 bxby
1869 nigel 93 ** Failers
1870 ph10 102 axby
1871 nigel 93
1872     /^(((?P=abc)|X)(?<abc>x|y))+/
1873     XxXxxx
1874     XxXyyx
1875     XxXyxx
1876     ** Failers
1877 ph10 102 x
1878 nigel 93
1879     /^(?1)(abc)/
1880     abcabc
1881    
1882     /^(?:(?:\1|X)(a|b))+/
1883     Xaaa
1884 ph10 102 Xaba
1885 nigel 93
1886 ph10 162 /^[\E\Qa\E-\Qz\E]+/BZ
1887 ph10 102
1888 ph10 162 /^[a\Q]bc\E]/BZ
1889 ph10 102
1890 ph10 162 /^[a-\Q\E]/BZ
1891 nigel 93
1892 ph10 162 /^(?P>abc)[()](?<abc>)/BZ
1893 nigel 93
1894 ph10 162 /^((?(abc)y)[()](?P<abc>x))+/BZ
1895 nigel 93 (xy)x
1896    
1897 ph10 162 /^(?P>abc)\Q()\E(?<abc>)/BZ
1898 nigel 93
1899 ph10 162 /^(?P>abc)[a\Q(]\E(](?<abc>)/BZ
1900 ph10 102
1901 nigel 93 /^(?P>abc) # this is (a comment)
1902 ph10 162 (?<abc>)/BZx
1903 nigel 93
1904     /^\W*(?:(?<one>(?<two>.)\W*(?&one)\W*\k<two>|)|(?<three>(?<four>.)\W*(?&three)\W*\k'four'|\W*.\W*))\W*$/Ii
1905     1221
1906     Satan, oscillate my metallic sonatas!
1907     A man, a plan, a canal: Panama!
1908 ph10 102 Able was I ere I saw Elba.
1909 nigel 93 *** Failers
1910 ph10 102 The quick brown fox
1911    
1912 nigel 93 /(?=(\w+))\1:/I
1913     abcd:
1914    
1915     /(?=(?'abc'\w+))\k<abc>:/I
1916     abcd:
1917    
1918     /(?'abc'\w+):\k<abc>{2}/
1919     a:aaxyz
1920     ab:ababxyz
1921     ** Failers
1922 ph10 102 a:axyz
1923     ab:abxyz
1924 nigel 93
1925     /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1926     adaa
1927     ** Failers
1928     addd
1929 ph10 102 adbb
1930 nigel 93
1931     /(?'abc'a|b)(?<abc>d|e)(?&abc){2}/J
1932     bdaa
1933     bdab
1934     ** Failers
1935 ph10 102 bddd
1936 nigel 93
1937     /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x
1938     abd
1939 ph10 102 ce
1940    
1941 nigel 93 /(?(<bc))/
1942    
1943 ph10 102 /(?(''))/
1944 nigel 93
1945     /(?('R')stuff)/
1946    
1947     /((abc (?(R) (?(R1)1) (?(R2)2) X | (?1) (?2) (?R) ))) /x
1948     abcabc1Xabc2XabcXabcabc
1949    
1950     /(?<A> (?'B' abc (?(R) (?(R&A)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1951     abcabc1Xabc2XabcXabcabc
1952    
1953     /(?<A> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1954    
1955     /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X | (?1) (?2) (?R) ))) /x
1956     abcabc1Xabc2XabcXabcabc
1957    
1958     /^(?(DEFINE) (?<A> a) (?<B> b) ) (?&A) (?&B) /x
1959     abcd
1960 ph10 102
1961 nigel 93 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))
1962     (?(DEFINE)
1963     (?<NAME_PAT>[a-z]+)
1964     (?<ADDRESS_PAT>\d+)
1965     )/x
1966     metcalfe 33
1967 ph10 102
1968 nigel 93 /^(?(DEFINE) abc | xyz ) /x
1969 ph10 102
1970 nigel 93 /(?(DEFINE) abc) xyz/xI
1971    
1972     /(?(DEFINE) abc){3} xyz/x
1973    
1974     /(a|)*\d/
1975     \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1976     \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
1977    
1978     /^a.b/<lf>
1979     a\rb
1980 ph10 102 a\nb\<cr>
1981 ph10 149 a\x85b\<anycrlf>
1982 nigel 93 ** Failers
1983     a\nb
1984     a\nb\<any>
1985 ph10 102 a\rb\<cr>
1986     a\rb\<any>
1987 ph10 149 a\x85b\<any>
1988     a\rb\<anycrlf>
1989 nigel 93
1990     /^abc./mgx<any>
1991     abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK
1992    
1993     /abc.$/mgx<any>
1994     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
1995    
1996     /a/<cr><any>
1997    
1998     /a/<any><crlf>
1999    
2000 ph10 247 /^a\Rb/<bsr_unicode>
2001 nigel 93 a\nb
2002     a\rb
2003     a\r\nb
2004     a\x0bb
2005     a\x0cb
2006 ph10 102 a\x85b
2007 nigel 93 ** Failers
2008 ph10 102 a\n\rb
2009 nigel 93
2010 ph10 247 /^a\R*b/<bsr_unicode>
2011 nigel 93 ab
2012     a\nb
2013     a\rb
2014     a\r\nb
2015     a\x0bb
2016     a\x0cb
2017 ph10 102 a\x85b
2018     a\n\rb
2019     a\n\r\x85\x0cb
2020 nigel 93
2021 ph10 247 /^a\R+b/<bsr_unicode>
2022 nigel 93 a\nb
2023     a\rb
2024     a\r\nb
2025     a\x0bb
2026     a\x0cb
2027 ph10 102 a\x85b
2028     a\n\rb
2029     a\n\r\x85\x0cb
2030 nigel 93 ** Failers
2031 ph10 102 ab
2032    
2033 ph10 247 /^a\R{1,3}b/<bsr_unicode>
2034 nigel 93 a\nb
2035     a\n\rb
2036     a\n\r\x85b
2037 ph10 102 a\r\n\r\nb
2038     a\r\n\r\n\r\nb
2039 nigel 93 a\n\r\n\rb
2040 ph10 102 a\n\n\r\nb
2041 nigel 93 ** Failers
2042     a\n\n\n\rb
2043     a\r
2044    
2045 ph10 247 /^a[\R]b/<bsr_unicode>
2046 nigel 93 aRb
2047     ** Failers
2048 ph10 102 a\nb
2049 nigel 93
2050     /(?&abc)X(?<abc>P)/I
2051     abcPXP123
2052    
2053     /(?1)X(?<abc>P)/I
2054     abcPXP123
2055    
2056     /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/
2057     1.2.3.4
2058     131.111.10.206
2059     10.0.0.0
2060     ** Failers
2061     10.6
2062 ph10 102 455.3.4.5
2063 nigel 93
2064     /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/
2065     1.2.3.4
2066     131.111.10.206
2067     10.0.0.0
2068     ** Failers
2069     10.6
2070 ph10 102 455.3.4.5
2071    
2072 nigel 93 /(?:a(?&abc)b)*(?<abc>x)/
2073     123axbaxbaxbx456
2074     123axbaxbaxb456
2075 ph10 102
2076 nigel 93 /(?:a(?&abc)b){1,5}(?<abc>x)/
2077     123axbaxbaxbx456
2078    
2079     /(?:a(?&abc)b){2,5}(?<abc>x)/
2080     123axbaxbaxbx456
2081    
2082     /(?:a(?&abc)b){2,}(?<abc>x)/
2083     123axbaxbaxbx456
2084    
2085     /(abc)(?i:(?1))/
2086     defabcabcxyz
2087     DEFabcABCXYZ
2088    
2089     /(abc)(?:(?i)(?1))/
2090     defabcabcxyz
2091     DEFabcABCXYZ
2092    
2093     /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/
2094     ababababbbabZXXXX
2095    
2096     /^(a)\g-2/
2097    
2098     /^(a)\g/
2099    
2100     /^(a)\g{0}/
2101    
2102     /^(a)\g{3/
2103    
2104     /^(a)\g{4a}/
2105    
2106     /^a.b/<lf>
2107     a\rb
2108     *** Failers
2109     a\nb
2110    
2111     /.+foo/
2112     afoo
2113 ph10 102 ** Failers
2114     \r\nfoo
2115     \nfoo
2116 nigel 93
2117     /.+foo/<crlf>
2118     afoo
2119 ph10 102 \nfoo
2120     ** Failers
2121     \r\nfoo
2122 nigel 93
2123     /.+foo/<any>
2124     afoo
2125 ph10 102 ** Failers
2126     \nfoo
2127     \r\nfoo
2128 nigel 93
2129     /.+foo/s
2130     afoo
2131 ph10 102 \r\nfoo
2132     \nfoo
2133 ph10 131
2134     /^$/mg<any>
2135     abc\r\rxyz
2136     abc\n\rxyz
2137     ** Failers
2138     abc\r\nxyz
2139 nigel 93
2140 ph10 141 /(?m)^$/<any>g+
2141     abc\r\n\r\n
2142    
2143 ph10 143 /(?m)^$|^\r\n/<any>g+
2144     abc\r\n\r\n
2145    
2146     /(?m)$/<any>g+
2147     abc\r\n\r\n
2148    
2149 ph10 149 /abc.$/mgx<anycrlf>
2150     abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9
2151    
2152 ph10 155 /^X/m
2153     XABC
2154     ** Failers
2155     XABC\B
2156    
2157 ph10 174 /(ab|c)(?-1)/BZ
2158 ph10 166 abc
2159    
2160 ph10 174 /xy(?+1)(abc)/BZ
2161 ph10 166 xyabcabc
2162     ** Failers
2163     xyabc
2164    
2165     /x(?-0)y/
2166    
2167     /x(?-1)y/
2168    
2169     /x(?+0)y/
2170    
2171     /x(?+1)y/
2172    
2173 ph10 174 /^(abc)?(?(-1)X|Y)/BZ
2174 ph10 167 abcX
2175     Y
2176     ** Failers
2177     abcY
2178    
2179 ph10 174 /^((?(+1)X|Y)(abc))+/BZ
2180 ph10 167 YabcXabc
2181     YabcXabcXabc
2182     ** Failers
2183     XabcXabc
2184    
2185 ph10 174 /(?(-1)a)/BZ
2186 ph10 167
2187 ph10 174 /((?(-1)a))/BZ
2188 ph10 167
2189 ph10 174 /((?(-2)a))/BZ
2190 ph10 167
2191 ph10 270 /^(?(+1)X|Y)(.)/BZ
2192     Y!
2193 ph10 167
2194 ph10 168 /(foo)\Kbar/
2195     foobar
2196    
2197     /(foo)(\Kbar|baz)/
2198     foobar
2199     foobaz
2200    
2201     /(foo\Kbar)baz/
2202     foobarbaz
2203    
2204 ph10 171 /(?<A>tom|bon)-\k{A}/
2205     tom-tom
2206     bon-bon
2207     ** Failers
2208     tom-bon
2209    
2210     /(?<A>tom|bon)-\g{A}/
2211     tom-tom
2212     bon-bon
2213    
2214     /\g{A/
2215    
2216 ph10 175 /(?|(abc)|(xyz))/BZ
2217     >abc<
2218     >xyz<
2219    
2220     /(x)(?|(abc)|(xyz))(x)/BZ
2221     xabcx
2222     xxyzx
2223    
2224     /(x)(?|(abc)(pqr)|(xyz))(x)/BZ
2225     xabcpqrx
2226     xxyzx
2227    
2228     /(?|(abc)|(xyz))\1/
2229     abcabc
2230     xyzxyz
2231     ** Failers
2232     abcxyz
2233     xyzabc
2234    
2235     /(?|(abc)|(xyz))(?1)/
2236     abcabc
2237     xyzabc
2238     ** Failers
2239     xyzxyz
2240    
2241 ph10 178 /\H\h\V\v/
2242     X X\x0a
2243     X\x09X\x0b
2244     ** Failers
2245     \xa0 X\x0a
2246    
2247     /\H*\h+\V?\v{3,4}/
2248     \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a
2249     \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a
2250     \x09\x20\xa0\x0a\x0b\x0c
2251     ** Failers
2252     \x09\x20\xa0\x0a\x0b
2253    
2254     /\H{3,4}/
2255     XY ABCDE
2256     XY PQR ST
2257    
2258     /.\h{3,4}./
2259     XY AB PQRS
2260    
2261     /\h*X\h?\H+Y\H?Z/
2262     >XNNNYZ
2263     > X NYQZ
2264     ** Failers
2265     >XYZ
2266     > X NY Z
2267    
2268     /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/
2269     >XY\x0aZ\x0aA\x0bNN\x0c
2270     >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c
2271    
2272     /[\h]/BZ
2273     >\x09<
2274    
2275     /[\h]+/BZ
2276     >\x09\x20\xa0<
2277    
2278     /[\v]/BZ
2279    
2280     /[\H]/BZ
2281    
2282     /[^\h]/BZ
2283    
2284     /[\V]/BZ
2285    
2286     /[\x0a\V]/BZ
2287    
2288 ph10 180 /\H++X/BZ
2289     ** Failers
2290     XXXX
2291    
2292     /\H+\hY/BZ
2293     XXXX Y
2294    
2295     /\H+ Y/BZ
2296    
2297     /\h+A/BZ
2298    
2299     /\v*B/BZ
2300    
2301     /\V+\x0a/BZ
2302    
2303     /A+\h/BZ
2304    
2305     / *\H/BZ
2306    
2307     /A*\v/BZ
2308    
2309     /\x0b*\V/BZ
2310    
2311     /\d+\h/BZ
2312    
2313     /\d*\v/BZ
2314    
2315     /S+\h\S+\v/BZ
2316    
2317     /\w{3,}\h\w+\v/BZ
2318    
2319     /\h+\d\h+\w\h+\S\h+\H/BZ
2320    
2321     /\v+\d\v+\w\v+\S\v+\V/BZ
2322    
2323     /\H+\h\H+\d/BZ
2324    
2325     /\V+\v\V+\w/BZ
2326    
2327 ph10 197 /\( (?: [^()]* | (?R) )* \)/x
2328     (0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(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CEPT)I/BZ
2343    
2344     /^a+(*FAIL)/
2345     aaaaaa
2346    
2347     /a+b?c+(*FAIL)/
2348     aaabccc
2349    
2350     /a+b?(*PRUNE)c+(*FAIL)/
2351     aaabccc
2352    
2353     /a+b?(*COMMIT)c+(*FAIL)/
2354     aaabccc
2355    
2356     /a+b?(*SKIP)c+(*FAIL)/
2357     aaabcccaaabccc
2358    
2359     /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
2360     aaaxxxxxx
2361     aaa++++++
2362     bbbxxxxx
2363     bbb+++++
2364     cccxxxx
2365     ccc++++
2366     dddddddd
2367    
2368     /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/
2369     aaaxxxxxx
2370     aaa++++++
2371     bbbxxxxx
2372     bbb+++++
2373     cccxxxx
2374     ccc++++
2375     dddddddd
2376    
2377     /a+b?(*THEN)c+(*FAIL)/
2378     aaabccc
2379    
2380     /(A (A|B(*ACCEPT)|C) D)(E)/x
2381     ABX
2382     AADE
2383     ACDE
2384     ** Failers
2385     AD
2386    
2387     /^a+(*FAIL)/C
2388     aaaaaa
2389    
2390     /a+b?c+(*FAIL)/C
2391     aaabccc
2392    
2393     /a+b?(*PRUNE)c+(*FAIL)/C
2394     aaabccc
2395    
2396     /a+b?(*COMMIT)c+(*FAIL)/C
2397     aaabccc
2398    
2399     /a+b?(*SKIP)c+(*FAIL)/C
2400     aaabcccaaabccc
2401    
2402     /a+b?(*THEN)c+(*FAIL)/C
2403     aaabccc
2404    
2405     /a(*PRUNE:XXX)b/
2406    
2407     /a(*MARK)b/
2408    
2409 ph10 213 /(?i:A{1,}\6666666666)/
2410    
2411     /\g6666666666/
2412    
2413     /[\g6666666666]/
2414    
2415 ph10 215 /(?1)\c[/
2416    
2417 ph10 226 /.+A/<crlf>
2418     \r\nA
2419    
2420     /\nA/<crlf>
2421     \r\nA
2422    
2423     /[\r\n]A/<crlf>
2424     \r\nA
2425    
2426     /(\r|\n)A/<crlf>
2427     \r\nA
2428    
2429 ph10 227 /a(*CR)b/
2430    
2431     /(*CR)a.b/
2432     a\nb
2433     ** Failers
2434     a\rb
2435    
2436     /(*CR)a.b/<lf>
2437     a\nb
2438     ** Failers
2439     a\rb
2440    
2441     /(*LF)a.b/<CRLF>
2442     a\rb
2443     ** Failers
2444     a\nb
2445    
2446     /(*CRLF)a.b/
2447     a\rb
2448     a\nb
2449     ** Failers
2450     a\r\nb
2451    
2452     /(*ANYCRLF)a.b/<CR>
2453     ** Failers
2454     a\rb
2455     a\nb
2456     a\r\nb
2457    
2458     /(*ANY)a.b/<cr>
2459     ** Failers
2460     a\rb
2461     a\nb
2462     a\r\nb
2463     a\x85b
2464    
2465 ph10 231 /a\Rb/I<bsr_anycrlf>
2466     a\rb
2467     a\nb
2468     a\r\nb
2469     ** Failers
2470     a\x85b
2471     a\x0bb
2472    
2473     /a\Rb/I<bsr_unicode>
2474     a\rb
2475     a\nb
2476     a\r\nb
2477     a\x85b
2478     a\x0bb
2479     ** Failers
2480     a\x85b\<bsr_anycrlf>
2481     a\x0bb\<bsr_anycrlf>
2482    
2483     /a\R?b/I<bsr_anycrlf>
2484     a\rb
2485     a\nb
2486     a\r\nb
2487     ** Failers
2488     a\x85b
2489     a\x0bb
2490    
2491     /a\R?b/I<bsr_unicode>
2492     a\rb
2493     a\nb
2494     a\r\nb
2495     a\x85b
2496     a\x0bb
2497     ** Failers
2498     a\x85b\<bsr_anycrlf>
2499     a\x0bb\<bsr_anycrlf>
2500    
2501     /a\R{2,4}b/I<bsr_anycrlf>
2502     a\r\n\nb
2503     a\n\r\rb
2504     a\r\n\r\n\r\n\r\nb
2505     ** Failers
2506     a\x85\85b
2507     a\x0b\0bb
2508    
2509     /a\R{2,4}b/I<bsr_unicode>
2510     a\r\rb
2511     a\n\n\nb
2512     a\r\n\n\r\rb
2513     a\x85\85b
2514     a\x0b\0bb
2515     ** Failers
2516     a\r\r\r\r\rb
2517     a\x85\85b\<bsr_anycrlf>
2518     a\x0b\0bb\<bsr_anycrlf>
2519    
2520     /(*BSR_ANYCRLF)a\Rb/I
2521     a\nb
2522     a\rb
2523    
2524     /(*BSR_UNICODE)a\Rb/I
2525     a\x85b
2526    
2527     /(*BSR_ANYCRLF)(*CRLF)a\Rb/I
2528     a\nb
2529     a\rb
2530    
2531     /(*CRLF)(*BSR_UNICODE)a\Rb/I
2532     a\x85b
2533    
2534     /(*CRLF)(*BSR_ANYCRLF)(*CR)ab/I
2535    
2536 ph10 268 /(?<a>)(?&)/
2537    
2538     /(?<abc>)(?&a)/
2539    
2540     /(?<a>)(?&aaaaaaaaaaaaaaaaaaaaaaa)/
2541    
2542 ph10 269 /(?+-a)/
2543    
2544     /(?-+a)/
2545    
2546 ph10 271 /(?(-1))/
2547    
2548     /(?(+10))/
2549    
2550     /(?(10))/
2551    
2552     /(?(+2))()()/
2553    
2554     /(?(2))()()/
2555    
2556 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