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

Contents of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 471 - (hide annotations) (download)
Fri Dec 11 15:11:55 2009 UTC (4 years, 7 months ago) by ph10
File size: 60837 byte(s)
Fix study bug with single-branch conditions, including (DEFINE).

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

Properties

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12