/[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 410 by ph10, Wed Apr 1 07:39:22 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 123  Line 147 
147      defabc      defabc
148      \Zdefabc      \Zdefabc
149    
150  /abc/IP  /abc/P
151      abc      abc
152      *** Failers      *** Failers
153    
154  /^abc|def/IP  /^abc|def/P
155      abcdef      abcdef
156      abcdef\B      abcdef\B
157    
158  /.*((abc)$|(def))/IP  /.*((abc)$|(def))/P
159      defabc      defabc
160      \Zdefabc      \Zdefabc
161    
162  /the quick brown fox/IP  /the quick brown fox/P
163      the quick brown fox      the quick brown fox
164      *** Failers      *** Failers
165      The Quick Brown Fox      The Quick Brown Fox
166    
167  /the quick brown fox/IPi  /the quick brown fox/Pi
168      the quick brown fox      the quick brown fox
169      The Quick Brown Fox      The Quick Brown Fox
170    
171  /abc.def/IP  /abc.def/P
172      *** Failers      *** Failers
173      abc\ndef      abc\ndef
174    
175  /abc$/IP  /abc$/P
176      abc      abc
177      abc\n      abc\n
178    
179  /(abc)\2/IP  /(abc)\2/P
180    
181  /(abc\1)/IP  /(abc\1)/P
182      abc      abc
183    
184  /)/  /)/
# 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 593  Line 632 
632      *** Failers      *** Failers
633      \Nabc      \Nabc
634    
635  /a*(b+)(z)(z)/IP  /a*(b+)(z)(z)/P
636      aaaabbbbzzzz      aaaabbbbzzzz
637      aaaabbbbzzzz\O0      aaaabbbbzzzz\O0
638      aaaabbbbzzzz\O1      aaaabbbbzzzz\O1
# 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
1432        abc
1433        ** Failers
1434        bca
1435    
1436    /abc/ISS>testsavedregex
1437    <testsavedregex
1438        abc
1439        ** Failers
1440        bca
1441    
1442    /abc/IFS>testsavedregex
1443  <testsavedregex  <testsavedregex
1444      abc      abc
1445      ** Failers      ** Failers
1446      bca      bca
1447    
1448  /abc/IF>testsavedregex  /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 1419  Line 1494 
1494      ** Failers      ** Failers
1495      line one\nthis is a line\nbreak in the second line      line one\nthis is a line\nbreak in the second line
1496    
1497  /ab.cd/IP  /ab.cd/P
1498      ab-cd      ab-cd
1499      ab=cd      ab=cd
1500      ** Failers      ** Failers
1501      ab\ncd      ab\ncd
1502    
1503  /ab.cd/IPs  /ab.cd/Ps
1504      ab-cd      ab-cd
1505      ab=cd      ab=cd
1506      ab\ncd      ab\ncd
# Line 1480  Line 1555 
1555      (this)      (this)
1556      ((this))      ((this))
1557    
1558  /a(b)c/IPN  /a(b)c/PN
1559      abc      abc
1560    
1561  /a(?P<name>b)c/IPN  /a(?P<name>b)c/PN
1562      abc      abc
1563    
1564  /\x{100}/I  /\x{100}/I
# Line 1915  a random value. /Ix Line 1990  a random value. /Ix
1990  /(?=(?'abc'\w+))\k<abc>:/I  /(?=(?'abc'\w+))\k<abc>:/I
1991      abcd:      abcd:
1992    
 /(?'abc'\w+):\k<abc>{2}/  
     a:aaxyz  
     ab:ababxyz  
     ** Failers  
     a:axyz  
     ab:abxyz  
   
1993  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J  /(?'abc'a|b)(?<abc>d|e)\k<abc>{2}/J
1994      adaa      adaa
1995      ** Failers      ** Failers
# Line 1934  a random value. /Ix Line 2002  a random value. /Ix
2002      ** Failers      ** Failers
2003      bddd      bddd
2004    
 /^(?<ab>a)? (?(<ab>)b|c) (?('ab')d|e)/x  
     abd  
     ce  
   
2005  /(?(<bc))/  /(?(<bc))/
2006    
2007  /(?(''))/  /(?(''))/
# Line 1955  a random value. /Ix Line 2019  a random value. /Ix
2019  /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x  /(?<1> (?'B' abc (?(R) (?(R&1)1) (?(R&B)2) X  |  (?1)  (?2)   (?R) ))) /x
2020      abcabc1Xabc2XabcXabcabc      abcabc1Xabc2XabcXabcabc
2021    
 /^(?(DEFINE) (?<A> a) (?<B> b) )  (?&A) (?&B) /x  
     abcd  
   
 /(?<NAME>(?&NAME_PAT))\s+(?<ADDR>(?&ADDRESS_PAT))  
   (?(DEFINE)  
   (?<NAME_PAT>[a-z]+)  
   (?<ADDRESS_PAT>\d+)  
   )/x  
     metcalfe 33  
   
2022  /^(?(DEFINE) abc | xyz ) /x  /^(?(DEFINE) abc | xyz ) /x
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    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4    \O0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa4
# Line 2053  a random value. /Ix Line 2105  a random value. /Ix
2105  /(?1)X(?<abc>P)/I  /(?1)X(?<abc>P)/I
2106      abcPXP123      abcPXP123
2107    
 /(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))\b(?&byte)(\.(?&byte)){3}/  
     1.2.3.4  
     131.111.10.206  
     10.0.0.0  
     ** Failers  
     10.6  
     455.3.4.5  
   
 /\b(?&byte)(\.(?&byte)){3}(?(DEFINE)(?<byte>2[0-4]\d|25[0-5]|1\d\d|[1-9]?\d))/  
     1.2.3.4  
     131.111.10.206  
     10.0.0.0  
     ** Failers  
     10.6  
     455.3.4.5  
   
2108  /(?:a(?&abc)b)*(?<abc>x)/  /(?:a(?&abc)b)*(?<abc>x)/
2109      123axbaxbaxbx456      123axbaxbaxbx456
2110      123axbaxbaxb456      123axbaxbaxb456
# Line 2090  a random value. /Ix Line 2126  a random value. /Ix
2126     defabcabcxyz     defabcabcxyz
2127     DEFabcABCXYZ     DEFabcABCXYZ
2128    
 /^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z/  
     ababababbbabZXXXX  
   
2129  /^(a)\g-2/  /^(a)\g-2/
2130    
2131  /^(a)\g/  /^(a)\g/
# Line 2191  a random value. /Ix Line 2224  a random value. /Ix
2224  /^(?(+1)X|Y)(.)/BZ  /^(?(+1)X|Y)(.)/BZ
2225      Y!      Y!
2226    
 /(foo)\Kbar/  
     foobar  
   
 /(foo)(\Kbar|baz)/  
     foobar  
     foobaz  
   
 /(foo\Kbar)baz/  
     foobarbaz  
   
2227  /(?<A>tom|bon)-\k{A}/  /(?<A>tom|bon)-\k{A}/
2228      tom-tom      tom-tom
2229      bon-bon      bon-bon
2230      ** Failers      ** Failers
2231      tom-bon      tom-bon
2232    
 /(?<A>tom|bon)-\g{A}/  
     tom-tom  
     bon-bon  
   
2233  /\g{A/  /\g{A/
2234    
2235  /(?|(abc)|(xyz))/BZ  /(?|(abc)|(xyz))/BZ
# Line 2225  a random value. /Ix Line 2244  a random value. /Ix
2244      xabcpqrx      xabcpqrx
2245      xxyzx      xxyzx
2246    
 /(?|(abc)|(xyz))\1/  
     abcabc  
     xyzxyz  
     ** Failers  
     abcxyz  
     xyzabc  
   
 /(?|(abc)|(xyz))(?1)/  
     abcabc  
     xyzabc  
     ** Failers  
     xyzxyz  
   
 /\H\h\V\v/  
     X X\x0a  
     X\x09X\x0b  
     ** Failers  
     \xa0 X\x0a  
   
 /\H*\h+\V?\v{3,4}/  
     \x09\x20\xa0X\x0a\x0b\x0c\x0d\x0a  
     \x09\x20\xa0\x0a\x0b\x0c\x0d\x0a  
     \x09\x20\xa0\x0a\x0b\x0c  
     ** Failers  
     \x09\x20\xa0\x0a\x0b  
   
 /\H{3,4}/  
     XY  ABCDE  
     XY  PQR ST  
   
 /.\h{3,4}./  
     XY  AB    PQRS  
   
 /\h*X\h?\H+Y\H?Z/  
     >XNNNYZ  
     >  X NYQZ  
     ** Failers  
     >XYZ  
     >  X NY Z  
   
 /\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c/  
     >XY\x0aZ\x0aA\x0bNN\x0c  
     >\x0a\x0dX\x0aY\x0a\x0bZZZ\x0aAAA\x0bNNN\x0c  
   
2247  /[\h]/BZ  /[\h]/BZ
2248      >\x09<      >\x09<
2249    
# Line 2325  a random value. /Ix Line 2300  a random value. /Ix
2300  /\V+\v\V+\w/BZ  /\V+\v\V+\w/BZ
2301    
2302  /\( (?: [^()]* | (?R) )* \)/x  /\( (?: [^()]* | (?R) )* \)/x
2303  (0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(0(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)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)0)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 2341  a random value. /Ix Line 2316  a random value. /Ix
2316    
2317  /A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ  /A(*PRUNE)B(*SKIP)C(*THEN)D(*COMMIT)E(*F)F(*FAIL)G(?!)H(*ACCEPT)I/BZ
2318    
 /^a+(*FAIL)/  
     aaaaaa  
   
 /a+b?c+(*FAIL)/  
     aaabccc  
   
 /a+b?(*PRUNE)c+(*FAIL)/  
     aaabccc  
   
 /a+b?(*COMMIT)c+(*FAIL)/  
     aaabccc  
   
 /a+b?(*SKIP)c+(*FAIL)/  
     aaabcccaaabccc  
   
 /^(?:aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/  
     aaaxxxxxx  
     aaa++++++  
     bbbxxxxx  
     bbb+++++  
     cccxxxx  
     ccc++++  
     dddddddd  
   
 /^(aaa(*THEN)\w{6}|bbb(*THEN)\w{5}|ccc(*THEN)\w{4}|\w{3})/  
     aaaxxxxxx  
     aaa++++++  
     bbbxxxxx  
     bbb+++++  
     cccxxxx  
     ccc++++  
     dddddddd  
   
 /a+b?(*THEN)c+(*FAIL)/  
     aaabccc  
   
 /(A (A|B(*ACCEPT)|C) D)(E)/x  
     ABX  
     AADE  
     ACDE  
     ** Failers  
     AD  
   
2319  /^a+(*FAIL)/C  /^a+(*FAIL)/C
2320      aaaaaa      aaaaaa
2321    
# Line 2402  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 2461  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 2559  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 2589  a random value. /Ix Line 2532  a random value. /Ix
2532    
2533  /[[:a\dz:]]/  /[[:a\dz:]]/
2534    
 /^(?<name>a|b\g<name>c)/  
     aaaa  
     bacxxx  
     bbaccxxx  
     bbbacccxx  
   
 /^(?<name>a|b\g'name'c)/  
     aaaa  
     bacxxx  
     bbaccxxx  
     bbbacccxx  
   
 /^(a|b\g<1>c)/  
     aaaa  
     bacxxx  
     bbaccxxx  
     bbbacccxx  
   
 /^(a|b\g'1'c)/  
     aaaa  
     bacxxx  
     bbaccxxx  
     bbbacccxx  
   
 /^(a|b\g'-1'c)/  
     aaaa  
     bacxxx  
     bbaccxxx  
     bbbacccxx  
   
 /(^(a|b\g<-1>c))/  
     aaaa  
     bacxxx  
     bbaccxxx  
     bbbacccxx  
   
2535  /(^(a|b\g<-1'c))/  /(^(a|b\g<-1'c))/
2536    
 /(^(a|b\g{-1}))/  
     bacxxx  
   
 /(?-i:\g<name>)(?i:(?<name>a))/  
     XaaX  
     XAAX  
   
 /(?i:\g<name>)(?-i:(?<name>a))/  
     XaaX  
     ** Failers  
     XAAX  
   
 /(?-i:\g<+1>)(?i:(a))/  
     XaaX  
     XAAX  
   
 /(?=(?<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>\})\}))\{/  
   
 /(?<n>a|b|c)\g<n>*/  
    abc  
    accccbbb  
   
2537  /^(?+1)(?<a>x|y){0}z/  /^(?+1)(?<a>x|y){0}z/
2538      xzxx      xzxx
2539      yzyy      yzyy
# Line 2748  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 2755  a random value. /Ix Line 2646  a random value. /Ix
2646  /^"((?(?=[a])[^"])|b)*"$/  /^"((?(?=[a])[^"])|b)*"$/
2647      "ab"      "ab"
2648    
 /^X(?5)(a)(?|(b)|(q))(c)(d)(Y)/  
     XYabcdY  
   
2649  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/  /^X(?5)(a)(?|(b)|(q))(c)(d)Y/
2650      XYabcdY      XYabcdY
2651    
2652  /^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/  /^X(?&N)(a)(?|(b)|(q))(c)(d)(?<N>Y)/
2653      XYabcdY      XYabcdY
2654    
2655  /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/  /Xa{2,4}b/
2656      XYabcdY      X\P
2657        Xa\P
2658        Xaa\P
2659        Xaaa\P
2660        Xaaaa\P
2661    
2662    /Xa{2,4}?b/
2663        X\P
2664        Xa\P
2665        Xaa\P
2666        Xaaa\P
2667        Xaaaa\P
2668    
2669    /Xa{2,4}+b/
2670        X\P
2671        Xa\P
2672        Xaa\P
2673        Xaaa\P
2674        Xaaaa\P
2675    
2676    /X\d{2,4}b/
2677        X\P
2678        X3\P
2679        X33\P
2680        X333\P
2681        X3333\P
2682    
2683    /X\d{2,4}?b/
2684        X\P
2685        X3\P
2686        X33\P
2687        X333\P
2688        X3333\P
2689    
2690    /X\d{2,4}+b/
2691        X\P
2692        X3\P
2693        X33\P
2694        X333\P
2695        X3333\P
2696    
2697    /X\D{2,4}b/
2698        X\P
2699        Xa\P
2700        Xaa\P
2701        Xaaa\P
2702        Xaaaa\P
2703    
2704    /X\D{2,4}?b/
2705        X\P
2706        Xa\P
2707        Xaa\P
2708        Xaaa\P
2709        Xaaaa\P
2710    
2711    /X\D{2,4}+b/
2712        X\P
2713        Xa\P
2714        Xaa\P
2715        Xaaa\P
2716        Xaaaa\P
2717    
2718    /X[abc]{2,4}b/
2719        X\P
2720        Xa\P
2721        Xaa\P
2722        Xaaa\P
2723        Xaaaa\P
2724    
2725    /X[abc]{2,4}?b/
2726        X\P
2727        Xa\P
2728        Xaa\P
2729        Xaaa\P
2730        Xaaaa\P
2731    
2732    /X[abc]{2,4}+b/
2733        X\P
2734        Xa\P
2735        Xaa\P
2736        Xaaa\P
2737        Xaaaa\P
2738    
2739    /X[^a]{2,4}b/
2740        X\P
2741        Xz\P
2742        Xzz\P
2743        Xzzz\P
2744        Xzzzz\P
2745    
2746    /X[^a]{2,4}?b/
2747        X\P
2748        Xz\P
2749        Xzz\P
2750        Xzzz\P
2751        Xzzzz\P
2752    
2753    /X[^a]{2,4}+b/
2754        X\P
2755        Xz\P
2756        Xzz\P
2757        Xzzz\P
2758        Xzzzz\P
2759    
2760    /(Y)X\1{2,4}b/
2761        YX\P
2762        YXY\P
2763        YXYY\P
2764        YXYYY\P
2765        YXYYYY\P
2766    
2767    /(Y)X\1{2,4}?b/
2768        YX\P
2769        YXY\P
2770        YXYY\P
2771        YXYYY\P
2772        YXYYYY\P
2773    
2774    /(Y)X\1{2,4}+b/
2775        YX\P
2776        YXY\P
2777        YXYY\P
2778        YXYYY\P
2779        YXYYYY\P
2780    
2781    /\++\KZ|\d+X|9+Y/
2782        ++++123999\P
2783        ++++123999Y\P
2784        ++++Z1234\P
2785    
2786    /Z(*F)/
2787        Z\P
2788        ZA\P
2789    
2790    /Z(?!)/
2791        Z\P
2792        ZA\P
2793    
2794    /dog(sbody)?/
2795        dogs\P
2796        dogs\P\P
2797    
2798    /dog(sbody)??/
2799        dogs\P
2800        dogs\P\P
2801    
2802    /dog|dogsbody/
2803        dogs\P
2804        dogs\P\P
2805    
2806    /dogsbody|dog/
2807        dogs\P
2808        dogs\P\P
2809    
2810    /\bthe cat\b/
2811        the cat\P
2812        the cat\P\P
2813    
2814    /abc/
2815       abc\P
2816       abc\P\P
2817    
2818    /\w+A/P
2819       CDAAAAB
2820    
2821  /^X(?7)(a)(?|(b|(r)(s))|(q))(c)(d)(Y)/  /\w+A/PU
2822      XYabcdY     CDAAAAB
2823    
2824  /^X(?7)(a)(?|(b|(?|(r)|(t))(s))|(q))(c)(d)(Y)/  /abc\K123/
2825      XYabcdY      xyzabc123pqr
2826        xyzabc12\P
2827        xyzabc12\P\P
2828    
2829    /(?<=abc)123/
2830        xyzabc123pqr
2831        xyzabc12\P
2832        xyzabc12\P\P
2833    
2834    /\babc\b/
2835        +++abc+++
2836        +++ab\P
2837        +++ab\P\P
2838    
2839    /(?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))/BZ
2840    
2841    /(?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))/BZ
2842    
2843    /(ab)(x(y)z(cd(*ACCEPT)))pq/BZ
2844    
2845    /abc\K/+
2846        abcdef
2847        abcdef\N\N
2848        xyzabcdef\N\N
2849        ** Failers
2850        abcdef\N
2851        xyzabcdef\N
2852    
2853    /^(?:(?=abc)|abc\K)/+
2854        abcdef
2855        abcdef\N\N
2856        ** Failers
2857        abcdef\N
2858    
2859    /a?b?/+
2860        xyz
2861        xyzabc
2862        xyzabc\N
2863        xyzabc\N\N
2864        xyz\N\N
2865        ** Failers
2866        xyz\N
2867    
2868    /^a?b?/+
2869        xyz
2870        xyzabc
2871        ** Failers
2872        xyzabc\N
2873        xyzabc\N\N
2874        xyz\N\N
2875        xyz\N
2876    
2877    /^(?<name>a|b\g<name>c)/
2878        aaaa
2879        bacxxx
2880        bbaccxxx
2881        bbbacccxx
2882    
2883    /^(?<name>a|b\g'name'c)/
2884        aaaa
2885        bacxxx
2886        bbaccxxx
2887        bbbacccxx
2888    
2889    /^(a|b\g<1>c)/
2890        aaaa
2891        bacxxx
2892        bbaccxxx
2893        bbbacccxx
2894    
2895    /^(a|b\g'1'c)/
2896        aaaa
2897        bacxxx
2898        bbaccxxx
2899        bbbacccxx
2900    
2901    /^(a|b\g'-1'c)/
2902        aaaa
2903        bacxxx
2904        bbaccxxx
2905        bbbacccxx
2906    
2907    /(^(a|b\g<-1>c))/
2908        aaaa
2909        bacxxx
2910        bbaccxxx
2911        bbbacccxx
2912    
2913    /(?-i:\g<name>)(?i:(?<name>a))/
2914        XaaX
2915        XAAX
2916    
2917    /(?i:\g<name>)(?-i:(?<name>a))/
2918        XaaX
2919        ** Failers
2920        XAAX
2921    
2922    /(?-i:\g<+1>)(?i:(a))/
2923        XaaX
2924        XAAX
2925    
2926    /(?=(?<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>\})\}))\{/
2927    
2928    /(?<n>a|b|c)\g<n>*/
2929       abc
2930       accccbbb
2931    
2932    /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/
2933        XYabcdY
2934    
2935    /(?<=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)/
  [\x09\x0A\x0D\x20-\x7E]# ASCII  
    | [\xC2-\xDF][\x80-\xBF]# non-overlong 2-byte  
    |  \xE0[\xA0-\xBF][\x80-\xBF]# excluding overlongs  
    | [\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}  # straight 3-byte  
    |  \xED[\x80-\x9F][\x80-\xBF]# excluding surrogates  
    |  \xF0[\x90-\xBF][\x80-\xBF]{2}# planes 1-3  
    | [\xF1-\xF3][\x80-\xBF]{3}  # planes 4-15  
    |  \xF4[\x80-\x8F][\x80-\xBF]{2}# plane 16  
    )*$%xs  
 <div align="justify"><p>- Im Aufbau -</p><h3 id="aventurien">Aventurien</h3><div style="border: 1px none ; margin: 5px 5px 5px 10px; float:right; width: 100px;"><strong>Navigation</strong> <br /><br /><a href="#aventurien">Aventurien</a><br /><a href="#ferdok">Die Stadt Ferdok</a><br /><a href="#weitere">Weitere Ziele</a></div><p>{mosimage} Aventurien ist ein Kontinent der Welt Dere undAusgangspunkt f&uuml;r die meisten Abenteuer in der Welt von <em>DasSchwarze Auge</em>. Von Nord nach S&uuml;d erstreckt sich derKontinent ca. &uuml;ber 3000 Meilen, von Ost nach West sind esimmerhin noch 2000 Meilen. Von den Tundren Thorwals bis zurW&uuml;ste Khom kann man so ziemlich alle Klimazonen in Aventurienfinden.</p><p>Im Herzen Aventuriens liegt das Kaiserreich, auch das Mittelreichgenannt, mit seiner Hauptstadt Gareth (rot umrandeter Bereich).  DieKultur erinnert entfernt an das mittelalterliche Europa. DieHandlung Drakensangs wird zu gro&szlig;en Teilen im Mittelreichspielen, genauer gesagt, in der Umgebung der Stadt Ferdok (s.u.).Doch auch andere, exotischere Orte sollen Ziel der Reise werden.</p><p>Zahlreiche V&ouml;lker und Rassen bewohnen den Kontinent, allenvoran nat&uuml;rlich die Menschenv&ouml;lker, die die Mehrheit derBewohner stellen. Unter den Menschen gibt es zahlreicheunterschiedliche Kulturen, z. B. die wikinger&auml;hnlichenThorwaler, das Nomadenvolk der Nivesen oder eben dieMittell&auml;nder. Daneben gibt es nat&uuml;rlich nochfantastischere V&ouml;lker wie die Elfen (mit mehrern Untergruppen),Zwerge, Orks und mehr, eben alles, was eine Fantasywelt zu bietenhat.</p><p>&nbsp;</p><h3 id="ferdok">Ferdok</h3><p><a target="_blank" href="images/stories/stadtplan_g.jpg">{mosimage}</a></p><p>Ferdok ist eine Grafenstadt im Mittelreich, etwas westlich derHauptstadt Gareth, und hat etwa 3000 Einwohner. Sie geh&ouml;rt zuden &auml;ltesten menschlichen Siedlungen des Kosch. Im Laufe derGeschichte mu&szlig;te die Stadt jedoch wegen einer &Auml;nderungdes Flu&szlig;laufes des Gro&szlig;en Flu&szlig;es im Jahre 270 BFverlegt werden, da die Stadt in der Bedeutungslosigkeit zu versinkendrohte. Heute liegt Ferdok wieder direkt an der Einm&uuml;ndung desRakula in den Gro&szlig;en Flu&szlig;. Obwohl  die Stadt diefr&uuml;here Bedeutung l&auml;ngst verloren hat, hat sich Ferdok alsein wichtiger Handelshafen etabliert (weltber&uuml;hmt: FerdokerBier). Hier werden die Waren von Gareth umgeschlagen, die &uuml;berdie gro&szlig;e Handelsstra&szlig;e von und nach Ferdok verfrachtetwerden. Ferdok ist damit eines der Tore zum Westen underm&ouml;glicht schnelle Reisen in andere Teile der Aventuriens.</p><p>Verwaltungstechnisch geh&ouml;rt Ferdok zum F&uuml;rstentumKosch, dessen Hauptstadt sie langezeit war. Mittlerweile hat siediesen Status jedoch an Angbar verloren. Trotz seiner wichtigenRolle als Handelsort sind die Bewohner Ferdoks ein eher biederesV&ouml;lkchen und h&auml;ngen der Erinnerung an die ruhmreichereVergangenheit hinterher. Nachts muss man auf den Stra&szlig;enneuerdings aufpassen. Zur Handlungszeit verunsichert n&auml;mlicheine grauenhafte Mordserie die Bewohner Ferdoks und l&auml;sst dieBev&ouml;lkerung nachts nicht richtig schlafen. Einige Bereichesollte man dann grunds&auml;tzlich nicht mehr besuchen, wenn einemdie eigene Gesundheit am Herzen liegt.</p><p>Die Stadt wird eine zentrale Anlaufstelle in Drakensang sein,weswegen sie auch vollst&auml;ndig, nach den Vorgaben desDSA-Regelwerks in das Spiel eingebaut wird. Der Stadtplan (zumVergr&ouml;&szlig;ern anklicken) wurde von Radon Labs dem Regelwerkdirekt entnommen und wird Euch auch f&uuml;r Drakensang gute Diensteleisten.</p><br /><h3 id="weitere">Weitere Reiseziele des Spiels</h3><a target="_blank"href="images/stories/artikel/map.jpg">{mosimage}</a> Insgesamt solles 12 Hauptregionen geben, die jeweils ca. 1 Quadratkilometergro&szlig; sind. Alle diese Regionen unterteilen sich nochmal in&uuml;ber 50 kleinere Gebiete. Bekannt sind neben Ferdok bislang:<ul><li>Avestreu (kleines Dorf s&uuml;d&ouml;stl. von Ferdok)</li><li>Dunkelwald (s&uuml;dl. von Ferdok)</li><li>Ruine Blutberge (s&uuml;dl. von Ferdok, am Rand desDunkelwaldes)</li><li>Moorbr&uuml;ck (s&uuml;dl. des Dunkelwaldes)</li><li>Burg Grimmzahn (westl. von Moorbr&uuml;ck)</li><li>Murolosch (eine Zwergenstadt)</li><li>der Berg Drachensang / Drakensang (im Amboss-Gebirgegelegen)</li></ul><p>&nbsp;</p><p>&nbsp;</p><p>Ausf&uuml;hrlichere Infos:</p><p><a title="Wiki Aventurica" target="_blank"href="http://dsa4.de/wiki">Wiki Aventurica </a>(externer Link)<br /><a href="http://www.eychgras.de/koschwiki/index.php"target="_blank">KoschWiki</a> (externer Link)</p><p>&nbsp;</p></div>  
4016    
4017  / End of testinput2 /  /-- End of testinput2 --/

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

  ViewVC Help
Powered by ViewVC 1.1.5