1 PCRE version 3.9 02-Jan-2002
57 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
61 /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
62 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
64 /(?>(\.\d\d[1-9]?))\d+/
76 /^((?>\w+)|(?>\s+))*$/
77 now is the time for all good men to come to the aid of the party
78 0: now is the time for all good men to come to the aid of the party
82 this is not a line with only words and spaces!
127 /((?>[^()]+)|\([^()]*\))+/
132 /\(((?>[^()]+)|\([^()]+\))+\)/
141 ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
169 /(a b(?x)c d (?-x)e f)/
238 /(?s-i:more.*than).*million/i
244 0: more \x0a than Million
249 more \n than \n million
252 /(?:(?s-i)more.*than).*million/i
258 0: more \x0a than Million
263 more \n than \n million
338 /^(?(?=abc)\w{3}:|\d\d)$/
350 /^(?(?!abc)\d\d|\w{3}:)$/
390 /( \( )? [^()]+ (?(1) \) |) /x
401 /( \( )? [^()]+ (?(1) \) ) /x
452 /((?i)blah)\s+(?i:\1)/
607 /(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
631 /(?i:saturday|sunday)/
671 /^([ab](?i)[cd]|[ef])/
698 /^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
734 /(?<=(?<!foo)bar)baz/
748 /The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
749 /it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
751 /where it does set $1 to aa when matching aaaaaa./
790 /^(a\1?)(a\1?)(a\2?)(a\3?)$/
844 /The following tests are taken from the Perl 5.005 test suite; some of them/
845 /are compatible with 5.004, but I'd rather not have to sort them out./
1368 /[a-zA-Z_][a-zA-Z0-9_]*/
1372 /^a(bc+|b[eh])g|.h$/
1376 /(bc+d$|ef*g.|h?i(j|k))/
1394 /((((((((((a))))))))))/
1408 /((((((((((a))))))))))\10/
1422 /(((((((((a)))))))))/
1435 /multiple words of text/
1444 multiple words, yeah
1517 bbaababbabaaaaabbaaaabba
1922 /[a-zA-Z_][a-zA-Z0-9_]*/i
1926 /^a(bc+|b[eh])g|.h$/i
1930 /(bc+d$|ef*g.|h?i(j|k))/i
1950 /((((((((((a))))))))))/i
1964 /((((((((((a))))))))))\10/i
1978 /(((((((((a)))))))))/i
1991 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
1996 /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
2001 /multiple words of text/i
2010 MULTIPLE WORDS, YEAH
2090 /a(?:b|c|d){4,5}(.)/
2095 /a(?:b|c|d){4,5}?(.)/
2107 /a(?:b|c|d){6,7}(.)/
2112 /a(?:b|c|d){6,7}?(.)/
2117 /a(?:b|c|d){5,6}(.)/
2122 /a(?:b|c|d){5,6}?(.)/
2127 /a(?:b|c|d){5,7}(.)/
2132 /a(?:b|c|d){5,7}?(.)/
2137 /a(?:b|(c|e){1,2}?|d)+?(.)/
2181 /(?:(f)(o)(o)|(b)(a)(r))*/
2217 /^(?:b|a(?=(.)))*\1/
2415 /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
2419 /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
2420 caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
2421 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
2444 /^a (?#xxx) (?#yyy) {3}c/x
2478 /((?s)^a(.))((?m)^b$)/
2569 /^(\()?blah(?(1)(\)))$/
2585 /^(\(+)?blah(?(1)(\)))$/
2723 /((?>[^()]+)|\([^()]*\))+/
2752 /^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
2772 0: the.quick.brown.fox
2800 the.quick.brown.fox-
2802 the.quick.brown.fox.
2804 the.quick.brown.fox_
2806 the.quick.brown.fox+
2809 /(?>.*)(?<=(abcd|wxyz))/
2818 a rather long string that doesn't end with one of them
2821 /word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
2822 word cat dog elephant mussel cow horse canary baboon snake shark otherword
2823 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
2824 word cat dog elephant mussel cow horse canary baboon snake shark
2827 /word (?>[a-zA-Z0-9]+ ){0,30}otherword/
2828 word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
2831 /(?<=\d{3}(?!999))foo/
2841 /(?<=(?!...999)\d{3})foo/
2851 /(?<=\d{3}(?!999)...)foo/
2861 /(?<=\d{3}...)(?<!999)foo/
2871 /<a[\s]+href[\s]*=[\s]* # find <a href=
2872 ([\"\'])? # find single or double quote
2873 (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
2874 # quote, otherwise match up to next space
2881 <a href=\"abcd xyz pqr\" cats
2882 0: <a href="abcd xyz pqr"
2885 <a href=\'abcd xyz pqr\' cats
2886 0: <a href='abcd xyz pqr'
2890 /<a\s+href\s*=\s* # find <a href=
2891 (["'])? # find single or double quote
2892 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
2893 # quote, otherwise match up to next space
2900 <a href=\"abcd xyz pqr\" cats
2901 0: <a href="abcd xyz pqr"
2904 <a href = \'abcd xyz pqr\' cats
2905 0: <a href = 'abcd xyz pqr'
2909 /<a\s+href(?>\s*)=(?>\s*) # find <a href=
2910 (["'])? # find single or double quote
2911 (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
2912 # quote, otherwise match up to next space
2919 <a href=\"abcd xyz pqr\" cats
2920 0: <a href="abcd xyz pqr"
2923 <a href = \'abcd xyz pqr\' cats
2924 0: <a href = 'abcd xyz pqr'
2990 / End of testinput3 /