/[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 448 by ph10, Tue Sep 15 19:11:48 2009 UTC revision 766 by ph10, Fri Nov 25 10:04:12 2011 UTC
# Line 1  Line 1 
1    /-- 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 a possible Perl
6        bug.
7    
8        NOTE: This is a non-UTF-8 set of tests. When UTF-8 is needed, use test
9        5, and if Unicode Property Support is needed, use test 13. --/
10    
11    /-- Originally, the Perl >= 5.10 things were in here too, but now I have
12        separated many (most?) of them out into test 11. However, there may still
13        be some that were overlooked. --/
14    
15  /(a)b|/I  /(a)b|/I
16    
17  /abc/I  /abc/I
# Line 40  Line 54 
54    
55  /(?X)[\B]/  /(?X)[\B]/
56    
57    /(?X)[\R]/
58    
59    /(?X)[\X]/
60    
61    /[\B]/BZ
62    
63    /[\R]/BZ
64    
65    /[\X]/BZ
66    
67  /[z-a]/  /[z-a]/
68    
69  /^*/  /^*/
# Line 333  Line 357 
357      *** Failers      *** Failers
358      a      a
359    
360  /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
361    
362  /^(a\1?){4}$/I  /^(a\1?){4}$/I
363        aaaa
364      aaaaaa      aaaaaa
365    
366    /Perl does not fail these two for the final subjects. Neither did PCRE until/
367    /release 8.01. The problem is in backtracking into a subpattern that contains/
368    /a recursive reference to itself. PCRE has now made these into atomic patterns./
369    
370    /^(xa|=?\1a){2}$/
371        xa=xaa
372        ** Failers
373        xa=xaaa
374    
375    /^(xa|=?\1a)+$/
376        xa=xaa
377        ** Failers
378        xa=xaaa
379    
380  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
381    
# Line 1025  Line 1064 
1064  /abc(?C)de(?C1)f/I  /abc(?C)de(?C1)f/I
1065      123abcdef      123abcdef
1066    
1067  /(?C1)\dabc(?C2)def/I  /(?C1)\dabc(?C2)def/IS
1068        1234abcdef
1069        *** Failers
1070        abcdef
1071    
1072    /(?C1)\dabc(?C2)def/ISS
1073      1234abcdef      1234abcdef
1074      *** Failers      *** Failers
1075      abcdef      abcdef
# Line 1122  Line 1166 
1166    
1167  /(a(?1)+b)/DZ  /(a(?1)+b)/DZ
1168    
 /^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/Ii  
     1221  
     Satan, oscillate my metallic sonatas!  
     A man, a plan, a canal: Panama!  
     Able was I ere I saw Elba.  
     *** Failers  
     The quick brown fox  
   
1169  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I  /^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/I
1170      12      12
1171      (((2+2)*-3)-7)      (((2+2)*-3)-7)
# Line 1282  Line 1318 
1318    abcde    abcde
1319    abcdfe    abcdfe
1320    
1321  /a*b/ICDZ  /a*b/ICDZS
1322      ab
1323      aaaab
1324      aaaacb
1325    
1326    /a*b/ICDZSS
1327    ab    ab
1328    aaaab    aaaab
1329    aaaacb    aaaacb
# Line 1292  Line 1333 
1333    aaaab    aaaab
1334    aaaacb    aaaacb
1335    
1336  /(abc|def)x/ICDZ  /(abc|def)x/ICDZS
1337      abcx
1338      defx
1339      ** Failers
1340      abcdefzx
1341    
1342    /(abc|def)x/ICDZSS
1343    abcx    abcx
1344    defx    defx
1345      ** Failers
1346    abcdefzx    abcdefzx
1347    
1348  /(ab|cd){3,4}/IC  /(ab|cd){3,4}/IC
# Line 1302  Line 1350 
1350    abcdabcd    abcdabcd
1351    abcdcdcdcdcd    abcdcdcdcdcd
1352    
1353  /([ab]{,4}c|xy)/ICDZ  /([ab]{,4}c|xy)/ICDZS
1354        Note: that { does NOT introduce a quantifier
1355    
1356    /([ab]{,4}c|xy)/ICDZSS
1357      Note: that { does NOT introduce a quantifier      Note: that { does NOT introduce a quantifier
1358    
1359  /([ab]{1,4}c|xy){4,5}?123/ICDZ  /([ab]{1,4}c|xy){4,5}?123/ICDZ
# Line 1376  Line 1427 
1427      1X      1X
1428      123456\P      123456\P
1429    
1430  /abc/I>testsavedregex  /abc/IS>testsavedregex
1431  <testsavedregex  <testsavedregex
1432      abc      abc
1433      ** Failers      ** Failers
1434      bca      bca
1435    
1436  /abc/IF>testsavedregex  /abc/ISS>testsavedregex
1437    <testsavedregex
1438        abc
1439        ** Failers
1440        bca
1441    
1442    /abc/IFS>testsavedregex
1443    <testsavedregex
1444        abc
1445        ** Failers
1446        bca
1447    
1448    /abc/IFSS>testsavedregex
1449  <testsavedregex  <testsavedregex
1450      abc      abc
1451      ** Failers      ** Failers
# Line 1394  Line 1457 
1457      ** Failers      ** Failers
1458      def      def
1459    
1460    /(a|b)/ISS>testsavedregex
1461    <testsavedregex
1462        abc
1463        ** Failers
1464        def
1465    
1466  /(a|b)/ISF>testsavedregex  /(a|b)/ISF>testsavedregex
1467  <testsavedregex  <testsavedregex
1468      abc      abc
1469      ** Failers      ** Failers
1470      def      def
1471    
1472    /(a|b)/ISSF>testsavedregex
1473    <testsavedregex
1474        abc
1475        ** Failers
1476        def
1477    
1478  ~<(\w+)/?>(.)*</(\1)>~smgI  ~<(\w+)/?>(.)*</(\1)>~smgI
1479      <!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>      \J1024<!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>
1480    
1481  /^a/IF  /^a/IF
1482    
# Line 1948  a random value. /Ix Line 2023  a random value. /Ix
2023    
2024  /(?(DEFINE) abc) xyz/xI  /(?(DEFINE) abc) xyz/xI
2025    
 /(?(DEFINE) abc){3} xyz/x  
   
2026  /(a|)*\d/  /(a|)*\d/
2027    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2028    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)
2304    
2305  /[\E]AAA/  /[\E]AAA/
2306    
# Line 2261  a random value. /Ix Line 2334  a random value. /Ix
2334  /a+b?(*THEN)c+(*FAIL)/C  /a+b?(*THEN)c+(*FAIL)/C
2335      aaabccc      aaabccc
2336    
 /a(*PRUNE:XXX)b/  
   
2337  /a(*MARK)b/  /a(*MARK)b/
2338    
2339  /(?i:A{1,}\6666666666)/  /(?i:A{1,}\6666666666)/
2340    
2341  /\g6666666666/  /\g6666666666/
2342    
2343  /[\g6666666666]/  /[\g6666666666]/BZ
2344    
2345  /(?1)\c[/  /(?1)\c[/
2346    
# Line 2320  a random value. /Ix Line 2391  a random value. /Ix
2391      a\nb      a\nb
2392      a\r\nb      a\r\nb
2393      a\x85b      a\x85b
2394    
2395    /(*ANY).*/g
2396        abc\r\ndef
2397    
2398    /(*ANYCRLF).*/g
2399        abc\r\ndef
2400    
2401    /(*CRLF).*/g
2402        abc\r\ndef
2403    
2404  /a\Rb/I<bsr_anycrlf>  /a\Rb/I<bsr_anycrlf>
2405      a\rb      a\rb
# Line 2418  a random value. /Ix Line 2498  a random value. /Ix
2498    
2499  /\k{}/  /\k{}/
2500    
2501    /\k/
2502    
2503    /\kabc/
2504    
2505  /(?P=)/  /(?P=)/
2506    
2507  /(?P>)/  /(?P>)/
# Line 2549  a random value. /Ix Line 2633  a random value. /Ix
2633    abc\Y    abc\Y
2634    abcxypqr    abcxypqr
2635    abcxypqr\Y    abcxypqr\Y
2636    
2637    /(*NO_START_OPT)xyz/C
2638      abcxyz
2639    
2640    /xyz/CY
2641      abcxyz
2642    
2643  /^"((?(?=[a])[^"])|b)*"$/C  /^"((?(?=[a])[^"])|b)*"$/C
2644      "ab"      "ab"
# Line 2750  a random value. /Ix Line 2840  a random value. /Ix
2840    
2841  /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ  /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
2842    
2843    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
2844    
2845  /abc\K/+  /abc\K/+
2846      abcdef      abcdef
2847      abcdef\N\N      abcdef\N\N
# Line 2840  a random value. /Ix Line 2932  a random value. /Ix
2932  /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/  /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
2933      XYabcdY      XYabcdY
2934    
2935  / End of testinput2 /  /(?<=b(?1)|zzz)(a)/
2936        xbaax
2937        xzzzax
2938    
2939    /(a)(?<=b\1)/
2940    
2941    /(a)(?<=b+(?1))/
2942    
2943    /(a+)(?<=b(?1))/
2944    
2945    /(a(?<=b(?1)))/
2946    
2947    /(?<=b(?1))xyz/
2948    
2949    /(?<=b(?1))xyz(b+)pqrstuvew/
2950    
2951    /(a|bc)\1/SI
2952    
2953    /(a|bc)\1{2,3}/SI
2954    
2955    /(a|bc)(?1)/SI
2956    
2957    /(a|b\1)(a|b\1)/SI
2958    
2959    /(a|b\1){2}/SI
2960    
2961    /(a|bbbb\1)(a|bbbb\1)/SI
2962    
2963    /(a|bbbb\1){2}/SI
2964    
2965    /^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
2966    
2967    /  (?: [\040\t] |  \(
2968    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2969    \)  )*                          # optional leading comment
2970    (?:    (?:
2971    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2972    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2973    |
2974    " (?:                      # opening quote...
2975    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2976    |                     #    or
2977    \\ [^\x80-\xff]           #   Escaped something (something != CR)
2978    )* "  # closing quote
2979    )                    # initial word
2980    (?:  (?: [\040\t] |  \(
2981    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2982    \)  )*  \.  (?: [\040\t] |  \(
2983    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2984    \)  )*   (?:
2985    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
2986    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
2987    |
2988    " (?:                      # opening quote...
2989    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
2990    |                     #    or
2991    \\ [^\x80-\xff]           #   Escaped something (something != CR)
2992    )* "  # closing quote
2993    )  )* # further okay, if led by a period
2994    (?: [\040\t] |  \(
2995    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2996    \)  )*  @  (?: [\040\t] |  \(
2997    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
2998    \)  )*    (?:
2999    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3000    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3001    |   \[                         # [
3002    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3003    \]                        #           ]
3004    )                           # initial subdomain
3005    (?:                                  #
3006    (?: [\040\t] |  \(
3007    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3008    \)  )*  \.                        # if led by a period...
3009    (?: [\040\t] |  \(
3010    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3011    \)  )*   (?:
3012    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3013    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3014    |   \[                         # [
3015    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3016    \]                        #           ]
3017    )                     #   ...further okay
3018    )*
3019    # address
3020    |                     #  or
3021    (?:
3022    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3023    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3024    |
3025    " (?:                      # opening quote...
3026    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
3027    |                     #    or
3028    \\ [^\x80-\xff]           #   Escaped something (something != CR)
3029    )* "  # closing quote
3030    )             # one word, optionally followed by....
3031    (?:
3032    [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
3033    \(
3034    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3035    \)       |  # comments, or...
3036    
3037    " (?:                      # opening quote...
3038    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
3039    |                     #    or
3040    \\ [^\x80-\xff]           #   Escaped something (something != CR)
3041    )* "  # closing quote
3042    # quoted strings
3043    )*
3044    <  (?: [\040\t] |  \(
3045    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3046    \)  )*                     # leading <
3047    (?:  @  (?: [\040\t] |  \(
3048    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3049    \)  )*    (?:
3050    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3051    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3052    |   \[                         # [
3053    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3054    \]                        #           ]
3055    )                           # initial subdomain
3056    (?:                                  #
3057    (?: [\040\t] |  \(
3058    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3059    \)  )*  \.                        # if led by a period...
3060    (?: [\040\t] |  \(
3061    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3062    \)  )*   (?:
3063    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3064    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3065    |   \[                         # [
3066    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3067    \]                        #           ]
3068    )                     #   ...further okay
3069    )*
3070    
3071    (?:  (?: [\040\t] |  \(
3072    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3073    \)  )*  ,  (?: [\040\t] |  \(
3074    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3075    \)  )*  @  (?: [\040\t] |  \(
3076    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3077    \)  )*    (?:
3078    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3079    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3080    |   \[                         # [
3081    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3082    \]                        #           ]
3083    )                           # initial subdomain
3084    (?:                                  #
3085    (?: [\040\t] |  \(
3086    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3087    \)  )*  \.                        # if led by a period...
3088    (?: [\040\t] |  \(
3089    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3090    \)  )*   (?:
3091    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3092    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3093    |   \[                         # [
3094    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3095    \]                        #           ]
3096    )                     #   ...further okay
3097    )*
3098    )* # further okay, if led by comma
3099    :                                # closing colon
3100    (?: [\040\t] |  \(
3101    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3102    \)  )*  )? #       optional route
3103    (?:
3104    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3105    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3106    |
3107    " (?:                      # opening quote...
3108    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
3109    |                     #    or
3110    \\ [^\x80-\xff]           #   Escaped something (something != CR)
3111    )* "  # closing quote
3112    )                    # initial word
3113    (?:  (?: [\040\t] |  \(
3114    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3115    \)  )*  \.  (?: [\040\t] |  \(
3116    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3117    \)  )*   (?:
3118    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3119    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3120    |
3121    " (?:                      # opening quote...
3122    [^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
3123    |                     #    or
3124    \\ [^\x80-\xff]           #   Escaped something (something != CR)
3125    )* "  # closing quote
3126    )  )* # further okay, if led by a period
3127    (?: [\040\t] |  \(
3128    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3129    \)  )*  @  (?: [\040\t] |  \(
3130    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3131    \)  )*    (?:
3132    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3133    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3134    |   \[                         # [
3135    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3136    \]                        #           ]
3137    )                           # initial subdomain
3138    (?:                                  #
3139    (?: [\040\t] |  \(
3140    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3141    \)  )*  \.                        # if led by a period...
3142    (?: [\040\t] |  \(
3143    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3144    \)  )*   (?:
3145    [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
3146    (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
3147    |   \[                         # [
3148    (?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
3149    \]                        #           ]
3150    )                     #   ...further okay
3151    )*
3152    #       address spec
3153    (?: [\040\t] |  \(
3154    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3155    \)  )*  > #                  trailing >
3156    # name and address
3157    )  (?: [\040\t] |  \(
3158    (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
3159    \)  )*                       # optional trailing comment
3160    /xSI
3161    
3162    /<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
3163    
3164    "(?>.*/)foo"SI
3165    
3166    /(?(?=[^a-z]+[a-z])  \d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} ) /xSI
3167    
3168    /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/iSI
3169    
3170    /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/SI
3171    
3172    /<a[\s]+href[\s]*=[\s]*          # find <a href=
3173     ([\"\'])?                       # find single or double quote
3174     (?(1) (.*?)\1 | ([^\s]+))       # if quote found, match up to next matching
3175                                     # quote, otherwise match up to next space
3176    /isxSI
3177    
3178    /^(?!:)                       # colon disallowed at start
3179      (?:                         # start of item
3180        (?: [0-9a-f]{1,4} |       # 1-4 hex digits or
3181        (?(1)0 | () ) )           # if null previously matched, fail; else null
3182        :                         # followed by colon
3183      ){1,7}                      # end item; 1-7 of them required
3184      [0-9a-f]{1,4} $             # final hex number at end of string
3185      (?(1)|.)                    # check that there was an empty component
3186      /xiIS
3187    
3188    /(?|(?<a>A)|(?<a>B))/I
3189        AB\Ca
3190        BA\Ca
3191    
3192    /(?|(?<a>A)|(?<b>B))/
3193    
3194    /(?:a(?<quote> (?<apostrophe>')|(?<realquote>")) |
3195        b(?<quote> (?<apostrophe>')|(?<realquote>")) )
3196        (?('quote')[a-z]+|[0-9]+)/JIx
3197        a"aaaaa
3198        b"aaaaa
3199        ** Failers
3200        b"11111
3201        a"11111
3202    
3203    /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
3204        abcdX
3205        eX
3206        ** Failers
3207        abcdY
3208        ey
3209    
3210    /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
3211        abcdd
3212        ** Failers
3213        abcdde
3214    
3215    /abcd*/
3216        xxxxabcd\P
3217        xxxxabcd\P\P
3218    
3219    /abcd*/i
3220        xxxxabcd\P
3221        xxxxabcd\P\P
3222        XXXXABCD\P
3223        XXXXABCD\P\P
3224    
3225    /abc\d*/
3226        xxxxabc1\P
3227        xxxxabc1\P\P
3228    
3229    /(a)bc\1*/
3230        xxxxabca\P
3231        xxxxabca\P\P
3232    
3233    /abc[de]*/
3234        xxxxabcde\P
3235        xxxxabcde\P\P
3236    
3237    /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
3238        broken and not behaving as specified in that it *does* bumpalong after
3239        hitting (*COMMIT). --/
3240    
3241    /(?1)(A(*COMMIT)|B)D/
3242        ABD
3243        XABD
3244        BAD
3245        ABXABD
3246        ** Failers
3247        ABX
3248        BAXBAD
3249    
3250    /(\3)(\1)(a)/<JS>
3251        cat
3252    
3253    /(\3)(\1)(a)/SI<JS>
3254        cat
3255    
3256    /(\3)(\1)(a)/SI
3257        cat
3258    
3259    /i(?(DEFINE)(?<s>a))/SI
3260        i
3261    
3262    /()i(?(1)a)/SI
3263        ia
3264    
3265    /(?i)a(?-i)b|c/BZ
3266        XabX
3267        XAbX
3268        CcC
3269        ** Failers
3270        XABX
3271    
3272    /(?i)a(?s)b|c/BZ
3273    
3274    /(?i)a(?s-i)b|c/BZ
3275    
3276    /^(ab(c\1)d|x){2}$/BZ
3277        xabcxd
3278    
3279    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
3280    
3281    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
3282    
3283    / -- The first four of these are not in the Perl >= 5.10 test because Perl
3284         documents that the use of \K in assertions is "not well defined". The
3285         last is here because Perl gives the match as "b" rather than "ab". I
3286         believe this to be a Perl bug. --/
3287    
3288    /(?=a\Kb)ab/
3289        ab
3290    
3291    /(?!a\Kb)ac/
3292        ac
3293    
3294    /^abc(?<=b\Kc)d/
3295        abcd
3296    
3297    /^abc(?<!b\Kq)d/
3298        abcd
3299    
3300    /(?>a\Kb)z|(ab)/
3301        ab
3302    
3303    /----------------------/
3304    
3305    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
3306    
3307    /abc(*MARK:)pqr/
3308    
3309    /abc(*:)pqr/
3310    
3311    /abc(*FAIL:123)xyz/
3312    
3313    /--- This should, and does, fail. In Perl, it does not, which I think is a
3314         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
3315    
3316    /A(*COMMIT)B/+K
3317        ACABX
3318    
3319    /--- These should be different, but in Perl 5.11 are not, which I think
3320         is a bug in Perl. ---/
3321    
3322    /A(*THEN)B|A(*THEN)C/K
3323        AC
3324    
3325    /A(*PRUNE)B|A(*PRUNE)C/K
3326        AC
3327    
3328    /--- A whole lot of tests of verbs with arguments are here rather than in test
3329         11 because Perl doesn't seem to follow its specification entirely
3330         correctly. ---/
3331    
3332    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
3333         not clear how Perl defines "involved in the failure of the match". ---/
3334    
3335    /^(A(*THEN:A)B|C(*THEN:B)D)/K
3336        AB
3337        CD
3338        ** Failers
3339        AC
3340        CB
3341    
3342    /--- Check the use of names for success and failure. PCRE doesn't show these
3343    names for success, though Perl does, contrary to its spec. ---/
3344    
3345    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
3346        AB
3347        CD
3348        ** Failers
3349        AC
3350        CB
3351    
3352    /--- An empty name does not pass back an empty string. It is the same as if no
3353    name were given. ---/
3354    
3355    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
3356        AB
3357        CD
3358    
3359    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
3360    
3361    /A(*PRUNE:A)B/K
3362        ACAB
3363    
3364    /(*MARK:A)(*PRUNE:B)(C|X)/KS
3365        C
3366        D
3367    
3368    /(*MARK:A)(*PRUNE:B)(C|X)/KSS
3369        C
3370        D
3371    
3372    /(*MARK:A)(*THEN:B)(C|X)/KS
3373        C
3374        D
3375    
3376    /(*MARK:A)(*THEN:B)(C|X)/KSY
3377        C
3378        D
3379    
3380    /(*MARK:A)(*THEN:B)(C|X)/KSS
3381        C
3382        D
3383    
3384    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
3385    
3386    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
3387        AAAC
3388    
3389    /--- Same --/
3390    
3391    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
3392        AAAC
3393    
3394    /--- This should fail; the SKIP advances by one, but when we get to AC, the
3395         PRUNE kills it. ---/
3396    
3397    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
3398        AAAC
3399    
3400    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
3401        AAAC
3402    
3403    /--- This should fail, as a null name is the same as no name ---/
3404    
3405    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
3406        AAAC
3407    
3408    /--- This fails in PCRE, and I think that is in accordance with Perl's
3409         documentation, though in Perl it succeeds. ---/
3410    
3411    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
3412        AAAC
3413    
3414    /--- Mark names can be duplicated ---/
3415    
3416    /A(*:A)B|X(*:A)Y/K
3417        AABC
3418        XXYZ
3419    
3420    /^A(*:A)B|^X(*:A)Y/K
3421        ** Failers
3422        XAQQ
3423    
3424    /--- A check on what happens after hitting a mark and them bumping along to
3425    something that does not even start. Perl reports tags after the failures here,
3426    though it does not when the individual letters are made into something
3427    more complicated. ---/
3428    
3429    /A(*:A)B|XX(*:B)Y/K
3430        AABC
3431        XXYZ
3432        ** Failers
3433        XAQQ
3434        XAQQXZZ
3435        AXQQQ
3436        AXXQQQ
3437    
3438    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
3439    optimizations defeat this. So does the PCRE optimization unless we disable it
3440    with \Y. ---/
3441    
3442    /(*COMMIT)ABC/
3443        ABCDEFG
3444        ** Failers
3445        DEFGABC\Y
3446    
3447    /--- Repeat some tests with added studying. ---/
3448    
3449    /A(*COMMIT)B/+KS
3450        ACABX
3451    
3452    /A(*THEN)B|A(*THEN)C/KS
3453        AC
3454    
3455    /A(*PRUNE)B|A(*PRUNE)C/KS
3456        AC
3457    
3458    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
3459        AB
3460        CD
3461        ** Failers
3462        AC
3463        CB
3464    
3465    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
3466        AB
3467        CD
3468        ** Failers
3469        AC
3470        CB
3471    
3472    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
3473        AB
3474        CD
3475    
3476    /A(*PRUNE:A)B/KS
3477        ACAB
3478    
3479    /(*MARK:A)(*PRUNE:B)(C|X)/KS
3480        C
3481        D
3482    
3483    /(*MARK:A)(*THEN:B)(C|X)/KS
3484        C
3485        D
3486    
3487    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
3488        AAAC
3489    
3490    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
3491        AAAC
3492    
3493    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
3494        AAAC
3495    
3496    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
3497        AAAC
3498    
3499    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
3500        AAAC
3501    
3502    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
3503        AAAC
3504    
3505    /A(*:A)B|XX(*:B)Y/KS
3506        AABC
3507        XXYZ
3508        ** Failers
3509        XAQQ
3510        XAQQXZZ
3511        AXQQQ
3512        AXXQQQ
3513    
3514    /(*COMMIT)ABC/
3515        ABCDEFG
3516        ** Failers
3517        DEFGABC\Y
3518    
3519    /^(ab (c+(*THEN)cd) | xyz)/x
3520        abcccd
3521    
3522    /^(ab (c+(*PRUNE)cd) | xyz)/x
3523        abcccd
3524    
3525    /^(ab (c+(*FAIL)cd) | xyz)/x
3526        abcccd
3527    
3528    /--- Perl 5.11 gets some of these wrong ---/
3529    
3530    /(?>.(*ACCEPT))*?5/
3531        abcde
3532    
3533    /(.(*ACCEPT))*?5/
3534        abcde
3535    
3536    /(.(*ACCEPT))5/
3537        abcde
3538    
3539    /(.(*ACCEPT))*5/
3540        abcde
3541    
3542    /A\NB./BZ
3543        ACBD
3544        *** Failers
3545        A\nB
3546        ACB\n
3547    
3548    /A\NB./sBZ
3549        ACBD
3550        ACB\n
3551        *** Failers
3552        A\nB
3553    
3554    /A\NB/<crlf>
3555        A\nB
3556        A\rB
3557        ** Failers
3558        A\r\nB
3559    
3560    /\R+b/BZ
3561    
3562    /\R+\n/BZ
3563    
3564    /\R+\d/BZ
3565    
3566    /\d*\R/BZ
3567    
3568    /\s*\R/BZ
3569    
3570    /-- Perl treats this one differently, not failing the second string. I believe
3571        that is a bug in Perl. --/
3572    
3573    /^((abc|abcx)(*THEN)y|abcd)/
3574        abcd
3575        *** Failers
3576        abcxy
3577    
3578    /(?<=abc)def/
3579        abc\P\P
3580    
3581    /abc$/
3582        abc
3583        abc\P
3584        abc\P\P
3585    
3586    /abc$/m
3587        abc
3588        abc\n
3589        abc\P\P
3590        abc\n\P\P
3591        abc\P
3592        abc\n\P
3593    
3594    /abc\z/
3595        abc
3596        abc\P
3597        abc\P\P
3598    
3599    /abc\Z/
3600        abc
3601        abc\P
3602        abc\P\P
3603    
3604    /abc\b/
3605        abc
3606        abc\P
3607        abc\P\P
3608    
3609    /abc\B/
3610        abc
3611        abc\P
3612        abc\P\P
3613    
3614    /.+/
3615        abc\>0
3616        abc\>1
3617        abc\>2
3618        abc\>3
3619        abc\>4
3620        abc\>-4
3621    
3622    /^\cģ/
3623    
3624    /(?P<abn>(?P=abn)xxx)/BZ
3625    
3626    /(a\1z)/BZ
3627    
3628    /(?P<abn>(?P=abn)(?<badstufxxx)/BZ
3629    
3630    /(?P<abn>(?P=axn)xxx)/BZ
3631    
3632    /(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
3633    
3634    /-- These tests are here because Perl gets the first one wrong. --/
3635    
3636    /(\R*)(.)/s
3637        \r\n
3638        \r\r\n\n\r
3639        \r\r\n\n\r\n
3640    
3641    /(\R)*(.)/s
3642        \r\n
3643        \r\r\n\n\r
3644        \r\r\n\n\r\n
3645    
3646    /((?>\r\n|\n|\x0b|\f|\r|\x85)*)(.)/s
3647        \r\n
3648        \r\r\n\n\r
3649        \r\r\n\n\r\n
3650    
3651    /-- --/
3652    
3653    /^abc$/BZ
3654    
3655    /^abc$/BZm
3656    
3657    /^(a)*+(\w)/S
3658        aaaaX
3659        ** Failers
3660        aaaa
3661    
3662    /^(?:a)*+(\w)/S
3663        aaaaX
3664        ** Failers
3665        aaaa
3666    
3667    /(a)++1234/SDZ
3668    
3669    /([abc])++1234/SI
3670    
3671    /(?<=(abc)+)X/
3672    
3673    /(^ab)/I
3674    
3675    /(^ab)++/I
3676    
3677    /(^ab|^)+/I
3678    
3679    /(^ab|^)++/I
3680    
3681    /(?:^ab)/I
3682    
3683    /(?:^ab)++/I
3684    
3685    /(?:^ab|^)+/I
3686    
3687    /(?:^ab|^)++/I
3688    
3689    /(.*ab)/I
3690    
3691    /(.*ab)++/I
3692    
3693    /(.*ab|.*)+/I
3694    
3695    /(.*ab|.*)++/I
3696    
3697    /(?:.*ab)/I
3698    
3699    /(?:.*ab)++/I
3700    
3701    /(?:.*ab|.*)+/I
3702    
3703    /(?:.*ab|.*)++/I
3704    
3705    /(?=a)[bcd]/I
3706    
3707    /((?=a))[bcd]/I
3708    
3709    /((?=a))+[bcd]/I
3710    
3711    /((?=a))++[bcd]/I
3712    
3713    /(?=a+)[bcd]/iI
3714    
3715    /(?=a+?)[bcd]/iI
3716    
3717    /(?=a++)[bcd]/iI
3718    
3719    /(?=a{3})[bcd]/iI
3720    
3721    /(abc)\1+/S
3722    
3723    /-- Perl doesn't get these right IMO (the 3rd is PCRE-specific) --/
3724    
3725    /(?1)(?:(b(*ACCEPT))){0}/
3726        b
3727    
3728    /(?1)(?:(b(*ACCEPT))){0}c/
3729        bc
3730        ** Failers
3731        b
3732    
3733    /(?1)(?:((*ACCEPT))){0}c/
3734        c
3735        c\N
3736    
3737    /^.*?(?(?=a)a|b(*THEN)c)/
3738        ba
3739    
3740    /^.*?(?(?=a)a|bc)/
3741        ba
3742    
3743    /^.*?(?(?=a)a(*THEN)b|c)/
3744        ac
3745    
3746    /^.*?(?(?=a)a(*THEN)b)c/
3747        ac
3748    
3749    /^.*?(a(*THEN)b)c/
3750        aabc
3751    
3752    /^.*? (?1) c (?(DEFINE)(a(*THEN)b))/x
3753        aabc
3754    
3755    /^.*?(a(*THEN)b|z)c/
3756        aabc
3757    
3758    /^.*?(z|a(*THEN)b)c/
3759        aabc
3760    
3761    /-- --/
3762    
3763    /-- These studied versions are here because they are not Perl-compatible; the
3764        studying means the mark is not seen. --/
3765    
3766    /(*MARK:A)(*SKIP:B)(C|X)/KS
3767        C
3768        D
3769    
3770    /(*:A)A+(*SKIP:A)(B|Z)/KS
3771        AAAC
3772    
3773    /-- --/
3774    
3775    "(?=a*(*ACCEPT)b)c"
3776        c
3777        c\N
3778    
3779    /(?1)c(?(DEFINE)((*ACCEPT)b))/
3780        c
3781        c\N
3782    
3783    /(?>(*ACCEPT)b)c/
3784        c
3785        c\N
3786    
3787    /(?:(?>(a)))+a%/++
3788        %aa%
3789    
3790    /(a)b|ac/++SS
3791        ac\O3
3792    
3793    /(a)(b)x|abc/++
3794         abc\O6
3795    
3796    /(a)bc|(a)(b)\2/
3797        \O3abc
3798        \O4abc
3799    
3800    /(?(DEFINE)(a(?2)|b)(b(?1)|a))(?:(?1)|(?2))/SI
3801    
3802    /(a(?2)|b)(b(?1)|a)(?:(?1)|(?2))/SI
3803    
3804    /(a(?2)|b)(b(?1)|a)(?1)(?2)/SI
3805    
3806    /(abc)(?1)/SI
3807    
3808    /^(?>a)++/
3809        aa\M
3810        aaaaaaaaa\M
3811    
3812    /(a)(?1)++/
3813        aa\M
3814        aaaaaaaaa\M
3815    
3816    /(?:(foo)|(bar)|(baz))X/SS=
3817        bazfooX
3818        foobazbarX
3819        barfooX
3820        bazX
3821        foobarbazX
3822        bazfooX\O0
3823        bazfooX\O2
3824        bazfooX\O4
3825        bazfooX\O6
3826        bazfooX\O8
3827        bazfooX\O10
3828    
3829    /(?=abc){3}abc/BZ
3830    
3831    /(?=abc)+abc/BZ
3832    
3833    /(?=abc)++abc/BZ
3834    
3835    /(?=abc){0}xyz/BZ
3836    
3837    /(?=(a))?./BZ
3838    
3839    /(?=(a))??./BZ
3840    
3841    /^(?=(a)){0}b(?1)/BZ
3842    
3843    /(?(DEFINE)(a))?b(?1)/BZ
3844    
3845    /^(?=(?1))?[az]([abc])d/BZ
3846    
3847    /^(?!a){0}\w+/BZ
3848    
3849    /(?<=(abc))?xyz/BZ
3850    
3851    /[:a[:abc]b:]/BZ
3852    
3853    /((?2))((?1))/SS
3854        abc
3855    
3856    /((?(R2)a+|(?1)b))/SS
3857        aaaabcde
3858    
3859    /(?(R)a*(?1)|((?R))b)/SS
3860        aaaabcde
3861    
3862    /(a+|(?R)b)/
3863    
3864    /^(a(*:A)(d|e(*:B))z|aeq)/C
3865        adz
3866        aez
3867        aeqwerty
3868    
3869    /.(*F)/
3870        \P\Pabc
3871    
3872    /\btype\b\W*?\btext\b\W*?\bjavascript\b/IS
3873    
3874    /\btype\b\W*?\btext\b\W*?\bjavascript\b|\burl\b\W*?\bshell:|<input\b.*?\btype\b\W*?\bimage\b|\bonkeyup\b\W*?\=/IS
3875    
3876    /a(*SKIP)c|b(*ACCEPT)|/+SI
3877        a
3878    
3879    /a(*SKIP)c|b(*ACCEPT)cd(*ACCEPT)|x/SI
3880        ax
3881    
3882    'a*(*ACCEPT)b'+
3883        \N\N
3884        abc\N\N
3885        bbb\N\N
3886    
3887    /(*ACCEPT)a/+I
3888        bax
3889    
3890    /z(*ACCEPT)a/+I
3891        baxzbx
3892    
3893    /a(?:.)*?a/ims
3894        \Mabbbbbbbbbbbbbbbbbbbbba
3895    
3896    /a(?:.(*THEN))*?a/ims
3897        \Mabbbbbbbbbbbbbbbbbbbbba
3898    
3899    /a(?:.(*THEN:ABC))*?a/ims
3900        \Mabbbbbbbbbbbbbbbbbbbbba
3901    
3902    /-- These tests are in agreement with development Perl 5.015, which has fixed
3903        some things, but they don't all work with 5.012, so they aren't in the
3904        Perl-compatible tests. Those after the first come from Perl's own test
3905        files. --/
3906    
3907    /^((yes|no)(*THEN)(*F))?/
3908      yes
3909    
3910    /(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
3911    AbcdCBefgBhiBqz
3912    
3913    /(A (.*)   C? (*THEN)  | A D) z/x
3914    AbcdCBefgBhiBqz
3915    
3916    /(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
3917    AbcdCBefgBhiBqz
3918    
3919    /(A (.*)   C? (*THEN)  | A D) \s* z/x
3920    AbcdCBefgBhiBqz
3921    
3922    /(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
3923    AbcdCBefgBhiBqz
3924    
3925    /(A (.*)   (?:C|) (*THEN)  | A D) z/x
3926    AbcdCBefgBhiBqz
3927    
3928    /(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
3929    AbcdCBefgBhiBqz
3930    
3931    /(A (.*)   C{0,6} (*THEN)  | A D) z/x
3932    AbcdCBefgBhiBqz
3933    
3934    /(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
3935    AbcdCEBefgBhiBqz
3936    
3937    /(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
3938    AbcdCEBefgBhiBqz
3939    
3940    /(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
3941    AbcdCBefgBhiBqz
3942    
3943    /(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
3944    AbcdCBefgBhiBqz
3945    
3946    /-----------------------------------------------/
3947    
3948    /^(?>a+)(?>(z+))\w/BZ
3949        aaaazzzzb
3950        ** Failers
3951        aazz
3952    
3953    /(.)(\1|a(?2))/
3954        bab
3955    
3956    /\1|(.)(?R)\1/
3957        cbbbc
3958    
3959    /(.)((?(1)c|a)|a(?2))/
3960        baa
3961    
3962    /(?P<abn>(?P=abn)xxx)/BZ
3963    
3964    /(a\1z)/BZ
3965    
3966    /^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
3967         \Maabbccddee
3968    
3969    /^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
3970         \Maabbccddee
3971    
3972    /^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
3973         \Maabbccddee
3974    
3975    /^a\x41z/<JS>
3976        aAz
3977        *** Failers
3978        ax41z
3979    
3980    /^a[m\x41]z/<JS>
3981        aAz
3982    
3983    /^a\x1z/<JS>
3984        ax1z
3985    
3986    /^a\u0041z/<JS>
3987        aAz
3988        *** Failers
3989        au0041z
3990    
3991    /^a[m\u0041]z/<JS>
3992        aAz
3993    
3994    /^a\u041z/<JS>
3995        au041z
3996        *** Failers
3997        aAz
3998    
3999    /^a\U0041z/<JS>
4000        aU0041z
4001        *** Failers
4002        aAz
4003    
4004    /(?(?=c)c|d)++Y/BZ
4005    
4006    /(?(?=c)c|d)*+Y/BZ
4007    
4008    /a[\NB]c/
4009        aNc
4010    
4011    /a[B-\Nc]/
4012    
4013    /(a)(?2){0,1999}?(b)/
4014    
4015    /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
4016    
4017    /-- End of testinput2 --/

Legend:
Removed from v.448  
changed lines
  Added in v.766

  ViewVC Help
Powered by ViewVC 1.1.5