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

Diff of /code/trunk/testdata/testinput2

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

revision 472 by ph10, Fri Dec 11 16:42:50 2009 UTC revision 620 by ph10, Sun Jul 17 13:53:14 2011 UTC
# Line 2  Line 2 
2      of PCRE's API, error diagnostics, and the compiled code of some patterns.      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,      It also checks the non-Perl syntax the PCRE supports (Python, .NET,
4      Oniguruma). Finally, there are some tests where PCRE and Perl differ,      Oniguruma). Finally, there are some tests where PCRE and Perl differ,
5      either because PCRE can't be compatible, or there is potential Perl      either because PCRE can't be compatible, or there is a possible Perl
6      bug. --/      bug. --/
7    
8  /-- Originally, the Perl 5.10 things were in here too, but now I have separated  /-- Originally, the Perl >= 5.10 things were in here too, but now I have
9      many (most?) of them out into test 11. However, there may still be some      separated many (most?) of them out into test 11. However, there may still
10      that were overlooked. --/      be some that were overlooked. --/
11    
12  /(a)b|/I  /(a)b|/I
13    
# Line 51  Line 51 
51    
52  /(?X)[\B]/  /(?X)[\B]/
53    
54    /(?X)[\R]/
55    
56    /(?X)[\X]/
57    
58    /[\B]/BZ
59    
60    /[\R]/BZ
61    
62    /[\X]/BZ
63    
64  /[z-a]/  /[z-a]/
65    
66  /^*/  /^*/
# Line 344  Line 354 
354      *** Failers      *** Failers
355      a      a
356    
357  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I  /This one is here because Perl behaves differently; see also the following/I
358    
359  /^(a\1?){4}$/I  /^(a\1?){4}$/I
360        aaaa
361      aaaaaa      aaaaaa
362    
363    /Perl does not fail these two for the final subjects. Neither did PCRE until/
364    /release 8.01. The problem is in backtracking into a subpattern that contains/
365    /a recursive reference to itself. PCRE has now made these into atomic patterns./
366    
367    /^(xa|=?\1a){2}$/
368        xa=xaa
369        ** Failers
370        xa=xaaa
371    
372    /^(xa|=?\1a)+$/
373        xa=xaa
374        ** Failers
375        xa=xaaa
376    
377  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
378    
# Line 1036  Line 1061 
1061  /abc(?C)de(?C1)f/I  /abc(?C)de(?C1)f/I
1062      123abcdef      123abcdef
1063    
1064  /(?C1)\dabc(?C2)def/I  /(?C1)\dabc(?C2)def/IS
1065        1234abcdef
1066        *** Failers
1067        abcdef
1068    
1069    /(?C1)\dabc(?C2)def/ISS
1070      1234abcdef      1234abcdef
1071      *** Failers      *** Failers
1072      abcdef      abcdef
# Line 1285  Line 1315 
1315    abcde    abcde
1316    abcdfe    abcdfe
1317    
1318  /a*b/ICDZ  /a*b/ICDZS
1319      ab
1320      aaaab
1321      aaaacb
1322    
1323    /a*b/ICDZSS
1324    ab    ab
1325    aaaab    aaaab
1326    aaaacb    aaaacb
# Line 1295  Line 1330 
1330    aaaab    aaaab
1331    aaaacb    aaaacb
1332    
1333  /(abc|def)x/ICDZ  /(abc|def)x/ICDZS
1334      abcx
1335      defx
1336      ** Failers
1337      abcdefzx
1338    
1339    /(abc|def)x/ICDZSS
1340    abcx    abcx
1341    defx    defx
1342      ** Failers
1343    abcdefzx    abcdefzx
1344    
1345  /(ab|cd){3,4}/IC  /(ab|cd){3,4}/IC
# Line 1305  Line 1347 
1347    abcdabcd    abcdabcd
1348    abcdcdcdcdcd    abcdcdcdcdcd
1349    
1350  /([ab]{,4}c|xy)/ICDZ  /([ab]{,4}c|xy)/ICDZS
1351        Note: that { does NOT introduce a quantifier
1352    
1353    /([ab]{,4}c|xy)/ICDZSS
1354      Note: that { does NOT introduce a quantifier      Note: that { does NOT introduce a quantifier
1355    
1356  /([ab]{1,4}c|xy){4,5}?123/ICDZ  /([ab]{1,4}c|xy){4,5}?123/ICDZ
# Line 1379  Line 1424 
1424      1X      1X
1425      123456\P      123456\P
1426    
1427  /abc/I>testsavedregex  /abc/IS>testsavedregex
1428    <testsavedregex
1429        abc
1430        ** Failers
1431        bca
1432    
1433    /abc/ISS>testsavedregex
1434  <testsavedregex  <testsavedregex
1435      abc      abc
1436      ** Failers      ** Failers
1437      bca      bca
1438    
1439  /abc/IF>testsavedregex  /abc/IFS>testsavedregex
1440    <testsavedregex
1441        abc
1442        ** Failers
1443        bca
1444    
1445    /abc/IFSS>testsavedregex
1446  <testsavedregex  <testsavedregex
1447      abc      abc
1448      ** Failers      ** Failers
# Line 1397  Line 1454 
1454      ** Failers      ** Failers
1455      def      def
1456    
1457    /(a|b)/ISS>testsavedregex
1458    <testsavedregex
1459        abc
1460        ** Failers
1461        def
1462    
1463  /(a|b)/ISF>testsavedregex  /(a|b)/ISF>testsavedregex
1464  <testsavedregex  <testsavedregex
1465      abc      abc
1466      ** Failers      ** Failers
1467      def      def
1468    
1469    /(a|b)/ISSF>testsavedregex
1470    <testsavedregex
1471        abc
1472        ** Failers
1473        def
1474    
1475  ~<(\w+)/?>(.)*</(\1)>~smgI  ~<(\w+)/?>(.)*</(\1)>~smgI
1476      <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>      <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
1477    
# Line 2264  a random value. /Ix Line 2333  a random value. /Ix
2333  /a+b?(*THEN)c+(*FAIL)/C  /a+b?(*THEN)c+(*FAIL)/C
2334      aaabccc      aaabccc
2335    
 /a(*PRUNE:XXX)b/  
   
2336  /a(*MARK)b/  /a(*MARK)b/
2337    
2338  /(?i:A{1,}\6666666666)/  /(?i:A{1,}\6666666666)/
# Line 2323  a random value. /Ix Line 2390  a random value. /Ix
2390      a\nb      a\nb
2391      a\r\nb      a\r\nb
2392      a\x85b      a\x85b
2393    
2394    /(*ANY).*/g
2395        abc\r\ndef
2396    
2397    /(*ANYCRLF).*/g
2398        abc\r\ndef
2399    
2400    /(*CRLF).*/g
2401        abc\r\ndef
2402    
2403  /a\Rb/I<bsr_anycrlf>  /a\Rb/I<bsr_anycrlf>
2404      a\rb      a\rb
# Line 2552  a random value. /Ix Line 2628  a random value. /Ix
2628    abc\Y    abc\Y
2629    abcxypqr    abcxypqr
2630    abcxypqr\Y    abcxypqr\Y
2631    
2632    /(*NO_START_OPT)xyz/C
2633      abcxyz
2634    
2635    /xyz/CY
2636      abcxyz
2637    
2638  /^"((?(?=[a])[^"])|b)*"$/C  /^"((?(?=[a])[^"])|b)*"$/C
2639      "ab"      "ab"
# Line 3147  a random value. /Ix Line 3229  a random value. /Ix
3229      xxxxabcde\P      xxxxabcde\P
3230      xxxxabcde\P\P      xxxxabcde\P\P
3231    
3232  /-- This is not in the Perl 5.10 test because Perl seems currently to be broken  /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
3233      and not behaving as specified in that it *does* bumpalong after hitting      broken and not behaving as specified in that it *does* bumpalong after
3234      (*COMMIT). --/      hitting (*COMMIT). --/
3235    
3236  /(?1)(A(*COMMIT)|B)D/  /(?1)(A(*COMMIT)|B)D/
3237      ABD      ABD
# Line 3186  a random value. /Ix Line 3268  a random value. /Ix
3268    
3269  /(?i)a(?s-i)b|c/BZ  /(?i)a(?s-i)b|c/BZ
3270    
3271    /^(ab(c\1)d|x){2}$/BZ
3272        xabcxd
3273    
3274    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
3275    
3276    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
3277    
3278    / -- The first four of these are not in the Perl >= 5.10 test because Perl
3279         documents that the use of \K in assertions is "not well defined". The
3280         last is here because Perl gives the match as "b" rather than "ab". I
3281         believe this to be a Perl bug. --/
3282    
3283    /(?=a\Kb)ab/
3284        ab
3285    
3286    /(?!a\Kb)ac/
3287        ac
3288    
3289    /^abc(?<=b\Kc)d/
3290        abcd
3291    
3292    /^abc(?<!b\Kq)d/
3293        abcd
3294    
3295    /(?>a\Kb)z|(ab)/
3296        ab
3297    
3298    /----------------------/
3299    
3300    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
3301    
3302    /abc(*MARK:)pqr/
3303    
3304    /abc(*:)pqr/
3305    
3306    /abc(*FAIL:123)xyz/
3307    
3308    /--- This should, and does, fail. In Perl, it does not, which I think is a
3309         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
3310    
3311    /A(*COMMIT)B/+K
3312        ACABX
3313    
3314    /--- These should be different, but in Perl 5.11 are not, which I think
3315         is a bug in Perl. ---/
3316    
3317    /A(*THEN)B|A(*THEN)C/K
3318        AC
3319    
3320    /A(*PRUNE)B|A(*PRUNE)C/K
3321        AC
3322    
3323    /--- A whole lot of tests of verbs with arguments are here rather than in test
3324         11 because Perl doesn't seem to follow its specification entirely
3325         correctly. ---/
3326    
3327    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
3328         not clear how Perl defines "involved in the failure of the match". ---/
3329    
3330    /^(A(*THEN:A)B|C(*THEN:B)D)/K
3331        AB
3332        CD
3333        ** Failers
3334        AC
3335        CB
3336    
3337    /--- Check the use of names for success and failure. PCRE doesn't show these
3338    names for success, though Perl does, contrary to its spec. ---/
3339    
3340    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
3341        AB
3342        CD
3343        ** Failers
3344        AC
3345        CB
3346    
3347    /--- An empty name does not pass back an empty string. It is the same as if no
3348    name were given. ---/
3349    
3350    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
3351        AB
3352        CD
3353    
3354    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
3355    
3356    /A(*PRUNE:A)B/K
3357        ACAB
3358    
3359    /(*MARK:A)(*PRUNE:B)(C|X)/KS
3360        C
3361        D
3362    
3363    /(*MARK:A)(*PRUNE:B)(C|X)/KSS
3364        C
3365        D
3366    
3367    /(*MARK:A)(*THEN:B)(C|X)/KS
3368        C
3369        D
3370    
3371    /(*MARK:A)(*THEN:B)(C|X)/KSS
3372        C
3373        D
3374    
3375    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
3376    
3377    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
3378        AAAC
3379    
3380    /--- Same --/
3381    
3382    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
3383        AAAC
3384    
3385    /--- This should fail; the SKIP advances by one, but when we get to AC, the
3386         PRUNE kills it. ---/
3387    
3388    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
3389        AAAC
3390    
3391    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
3392        AAAC
3393    
3394    /--- This should fail, as a null name is the same as no name ---/
3395    
3396    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
3397        AAAC
3398    
3399    /--- This fails in PCRE, and I think that is in accordance with Perl's
3400         documentation, though in Perl it succeeds. ---/
3401    
3402    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
3403        AAAC
3404    
3405    /--- Mark names can be duplicated ---/
3406    
3407    /A(*:A)B|X(*:A)Y/K
3408        AABC
3409        XXYZ
3410    
3411    /^A(*:A)B|^X(*:A)Y/K
3412        ** Failers
3413        XAQQ
3414    
3415    /--- A check on what happens after hitting a mark and them bumping along to
3416    something that does not even start. Perl reports tags after the failures here,
3417    though it does not when the individual letters are made into something
3418    more complicated. ---/
3419    
3420    /A(*:A)B|XX(*:B)Y/K
3421        AABC
3422        XXYZ
3423        ** Failers
3424        XAQQ
3425        XAQQXZZ
3426        AXQQQ
3427        AXXQQQ
3428    
3429    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
3430    optimizations defeat this. So does the PCRE optimization unless we disable it
3431    with \Y. ---/
3432    
3433    /(*COMMIT)ABC/
3434        ABCDEFG
3435        ** Failers
3436        DEFGABC\Y
3437    
3438    /--- Repeat some tests with added studying. ---/
3439    
3440    /A(*COMMIT)B/+KS
3441        ACABX
3442    
3443    /A(*THEN)B|A(*THEN)C/KS
3444        AC
3445    
3446    /A(*PRUNE)B|A(*PRUNE)C/KS
3447        AC
3448    
3449    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
3450        AB
3451        CD
3452        ** Failers
3453        AC
3454        CB
3455    
3456    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
3457        AB
3458        CD
3459        ** Failers
3460        AC
3461        CB
3462    
3463    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
3464        AB
3465        CD
3466    
3467    /A(*PRUNE:A)B/KS
3468        ACAB
3469    
3470    /(*MARK:A)(*PRUNE:B)(C|X)/KS
3471        C
3472        D
3473    
3474    /(*MARK:A)(*THEN:B)(C|X)/KS
3475        C
3476        D
3477    
3478    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
3479        AAAC
3480    
3481    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
3482        AAAC
3483    
3484    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
3485        AAAC
3486    
3487    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
3488        AAAC
3489    
3490    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
3491        AAAC
3492    
3493    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
3494        AAAC
3495    
3496    /A(*:A)B|XX(*:B)Y/KS
3497        AABC
3498        XXYZ
3499        ** Failers
3500        XAQQ
3501        XAQQXZZ
3502        AXQQQ
3503        AXXQQQ
3504    
3505    /(*COMMIT)ABC/
3506        ABCDEFG
3507        ** Failers
3508        DEFGABC\Y
3509    
3510    /^(ab (c+(*THEN)cd) | xyz)/x
3511        abcccd
3512    
3513    /^(ab (c+(*PRUNE)cd) | xyz)/x
3514        abcccd
3515    
3516    /^(ab (c+(*FAIL)cd) | xyz)/x
3517        abcccd
3518    
3519    /--- Perl 5.11 gets some of these wrong ---/
3520    
3521    /(?>.(*ACCEPT))*?5/
3522        abcde
3523    
3524    /(.(*ACCEPT))*?5/
3525        abcde
3526    
3527    /(.(*ACCEPT))5/
3528        abcde
3529    
3530    /(.(*ACCEPT))*5/
3531        abcde
3532    
3533    /A\NB./BZ
3534        ACBD
3535        *** Failers
3536        A\nB
3537        ACB\n
3538    
3539    /A\NB./sBZ
3540        ACBD
3541        ACB\n
3542        *** Failers
3543        A\nB
3544    
3545    /A\NB/<crlf>
3546        A\nB
3547        A\rB
3548        ** Failers
3549        A\r\nB
3550    
3551    /\R+b/BZ
3552    
3553    /\R+\n/BZ
3554    
3555    /\R+\d/BZ
3556    
3557    /\d*\R/BZ
3558    
3559    /\s*\R/BZ
3560    
3561    /-- Perl treats this one differently, not failing the second string. I believe
3562        that is a bug in Perl. --/
3563    
3564    /^((abc|abcx)(*THEN)y|abcd)/
3565        abcd
3566        *** Failers
3567        abcxy
3568    
3569    /(?<=abc)def/
3570        abc\P\P
3571    
3572    /abc$/
3573        abc
3574        abc\P
3575        abc\P\P
3576    
3577    /abc$/m
3578        abc
3579        abc\n
3580        abc\P\P
3581        abc\n\P\P
3582        abc\P
3583        abc\n\P
3584    
3585    /abc\z/
3586        abc
3587        abc\P
3588        abc\P\P
3589    
3590    /abc\Z/
3591        abc
3592        abc\P
3593        abc\P\P
3594    
3595    /abc\b/
3596        abc
3597        abc\P
3598        abc\P\P
3599    
3600    /abc\B/
3601        abc
3602        abc\P
3603        abc\P\P
3604    
3605    /.+/
3606        abc\>0
3607        abc\>1
3608        abc\>2
3609        abc\>3
3610        abc\>4
3611        abc\>-4
3612    
3613    /^\cģ/
3614    
3615    /(?P<abn>(?P=abn)xxx)/BZ
3616    
3617    /(a\1z)/BZ
3618    
3619    /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
3620    
3621    /(?P<abn>(?P=axn)xxx)/BZ
3622    
3623    /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
3624    
3625    /-- These tests are here because Perl gets the first one wrong. --/
3626    
3627    /(\R*)(.)/s
3628        \r\n
3629        \r\r\n\n\r
3630        \r\r\n\n\r\n
3631    
3632    /(\R)*(.)/s
3633        \r\n
3634        \r\r\n\n\r
3635        \r\r\n\n\r\n
3636    
3637    /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
3638        \r\n
3639        \r\r\n\n\r
3640        \r\r\n\n\r\n
3641    
3642    /-- --/
3643    
3644    /^abc$/BZ
3645    
3646    /^abc$/BZm
3647    
3648    /^(a)*+(\w)/S
3649        aaaaX
3650        ** Failers
3651        aaaa
3652    
3653    /^(?:a)*+(\w)/S
3654        aaaaX
3655        ** Failers
3656        aaaa
3657    
3658    /(a)++1234/SDZ
3659    
3660    /([abc])++1234/SI
3661    
3662    /(?<=(abc)+)X/
3663    
3664    /(^ab)/I
3665    
3666    /(^ab)++/I
3667    
3668    /(^ab|^)+/I
3669    
3670    /(^ab|^)++/I
3671    
3672    /(?:^ab)/I
3673    
3674    /(?:^ab)++/I
3675    
3676    /(?:^ab|^)+/I
3677    
3678    /(?:^ab|^)++/I
3679    
3680    /(.*ab)/I
3681    
3682    /(.*ab)++/I
3683    
3684    /(.*ab|.*)+/I
3685    
3686    /(.*ab|.*)++/I
3687    
3688    /(?:.*ab)/I
3689    
3690    /(?:.*ab)++/I
3691    
3692    /(?:.*ab|.*)+/I
3693    
3694    /(?:.*ab|.*)++/I
3695    
3696    /(?=a)[bcd]/I
3697    
3698    /((?=a))[bcd]/I
3699    
3700    /((?=a))+[bcd]/I
3701    
3702    /((?=a))++[bcd]/I
3703    
3704    /(?=a+)[bcd]/iI
3705    
3706    /(?=a+?)[bcd]/iI
3707    
3708    /(?=a++)[bcd]/iI
3709    
3710    /(?=a{3})[bcd]/iI
3711    
3712    /(abc)\1+/S
3713    
3714    /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
3715    
3716    /(?1)(?:(b(*ACCEPT))){0}/
3717        b
3718    
3719    /(?1)(?:(b(*ACCEPT))){0}c/
3720        bc
3721        ** Failers
3722        b
3723    
3724    /(?1)(?:((*ACCEPT))){0}c/
3725        c
3726        c\N
3727    
3728    /^.*?(?(?=a)a|b(*THEN)c)/
3729        ba
3730    
3731    /^.*?(?(?=a)a|bc)/
3732        ba
3733    
3734    /-- --/
3735    
3736    /-- These studied versions are here because they are not Perl-compatible; the
3737        studying means the mark is not seen. --/
3738    
3739    /(*MARK:A)(*SKIP:B)(C|X)/KS
3740        C
3741        D
3742    
3743    /(*:A)A+(*SKIP:A)(B|Z)/KS
3744        AAAC
3745    
3746    /-- --/
3747    
3748    "(?=a*(*ACCEPT)b)c"
3749        c
3750        c\N
3751    
3752    /(?1)c(?(DEFINE)((*ACCEPT)b))/
3753        c
3754        c\N
3755    
3756    /(?>(*ACCEPT)b)c/
3757        c
3758        c\N
3759    
3760    /(?:(?>(a)))+a%/++
3761        %aa%
3762    
3763    /(a)b|ac/++
3764        ac\O3
3765    
3766    /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
3767    
3768    /(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
3769    
3770    /(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
3771    
3772    /(abc)(?1)/SI
3773    
3774  /-- End of testinput2 --/  /-- End of testinput2 --/

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12