58
this sentence eventually mentions a cat
59
this sentences rambles on and on for a while and then reaches elephant
62
this sentence eventually mentions a cat
63
this sentences rambles on and on for a while and then reaches elephant
66
this sentence eventually mentions a CAT cat
67
this sentences rambles on and on for a while to elephant ElePhant
107
/the quick brown fox/
109
this is a line with the quick brown fox
111
/the quick brown fox/A
114
this is a line with the quick brown fox
138
/the quick brown fox/P
143
/the quick brown fox/Pi
165
co-processors, and for
239
/(a*b|(?i:c*(?-i)d))/S
259
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
264
/(?<!foo)(alpha|omega)/S
294
/The next three are in testinput2 because they have variable length branches/
296
/(?<=bullock|donkey)-cart/
305
/(?>.*)(?<=(abcd)|(xyz))/
309
/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/
328
/This one is here because Perl 5.005_02 doesn't fail it/
334
/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/
339
/These are syntax tests from Perl 5.005/
419
abcdefghijklmnopqrstuvwxyz
420
abcdefghijklmnopqrstuvwxyz\C1
421
abcdefghijklmnopqrstuvwxyz\G1
424
abcdefghijklmnopqrstuvwxyz
425
abcdefghijklmnopqrstuvwxyz\C1\G1
428
abcdefghijklmnopqrstuvwxyz
429
abcdefghijklmnopqrstuvwxyz\C1\G1\L
439
/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
440
)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
441
)?)?)?)?)?)?)?)?)?otherword/M
608
(?: # Non-capturing bracket
609
(?>[^()]+) # Either a sequence of non-brackets (no backtracking)
611
(?R) # Recurse - i.e. nested bracketed string
612
)* # Zero or more contents
621
12(abcde(fsh)xyz(foo(bar))lmno)89
627
/\( ( (?>[^()]+) | (?R) )* \) /xg
631
/\( (?: (?>[^()]+) | (?R) ) \) /x
639
/\( (?: (?>[^()]+) | (?R) )? \) /x
641
12(abcde(fsh)xyz(foo(bar))lmno)89
643
/\( ( (?>[^()]+) | (?R) )* \) /x
646
/\( ( ( (?>[^()]+) | (?R) )* ) \) /x
649
/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
653
/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
657
/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
660
/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
663
/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
723
/((?-i)[[:lower:]])[[:lower:]]/i
734
/This one's here because of the large output vector needed/
736
/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d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))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/
737
\O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC
739
/This one's here because Perl does this differently and PCRE can't at present/
745
/These are all cases where Perl does it differently (nested captures)/
771
/^(?:aa(bb(?:b))?)+$/
774
/^(?:aa(b(?:bb))?)+$/
780
/^(?:aa(?:b(bb))?)+$/
789
/--------------------------------------------------------------------/
816
/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
818
/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
850
now is the time for all good men to come to the aid of the party
852
this is not a line with only words and spaces!
868
/([^()]++|\([^()]*\))+/
871
/\(([^()]++|\([^()]+\))+\)/
875
((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
893
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D
927
/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
937
|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|DM
939
|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|DM
1022
/(?C1)\dabc(?C2)def/
1057
/((xyz)(?C)p|(?C1)xyzabc)/
1060
/(X)((xyz)(?C)p|(?C1)xyzabc)/
1063
/(?=(abc))(?C)abcdef/
1066
/(?!(abc)(?C1)d)(?C2)abcxyz/
1082
/(ab|(bc|(de|(?R))))/
1084
/x(ab|(bc|(de|(?R))))/
1093
/(ab|(bc|(de|(?1))))/
1095
/x(ab|(bc|(de|(?1)x)x)x)/
1097
/^([^()]|\((?1)*\))*$/
1104
/^>abc>([^()]|\((?1)*\))*<xyz<$/
1113
/^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/i
1115
Satan, oscillate my metallic sonatas!
1116
A man, a plan, a canal: Panama!
1117
Able was I ere I saw Elba.
1121
/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
1135
/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
1162
/a(?P<name1>b|c)d(?P<longername2>e)/D
1166
/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D
1168
/(?P<a>a)...(?P=a)bbb(?P>a)d/D
1170
/^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/i
1172
Satan, oscillate my metallic sonatas!
1173
A man, a plan, a canal: Panama!
1174
Able was I ere I saw Elba.
1178
/((?(R)a|b))\1(?1)?/
1190
/((.*)a|(.*)b)z\1/sI
1192
/((.*)a|(.*)b)z\2/sI
1194
/((.*)a|(.*)b)z\3/sI
1196
/((.*)a|^(.*)b)z\3/sI
1198
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/sI
1200
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/sI
1202
/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/sI
1210
/(a)(?P<named>bc)/ND
1213
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
1222
/ab(?P<one>cd)ef(?P<two>gh)/
1228
/(?P<Tes>)(?P<Test>)/D
1230
/(?P<Test>)(?P<Tes>)/D
1232
/(?P<Z>zz)(?P<A>aa)/
1236
/(?P<x>eks)(?P<x>eccs)/
1238
/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/
1240
"\[((?P<elem>\d+)(,(?P>elem))*)\]"
1241
[10,20,30,5,5,4,4,2,43,23,4234]
1245
"\[((?P<elem>\d+)(,(?P>elem))*)?\]"
1246
[10,20,30,5,5,4,4,2,43,23,4234]
1257
/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/i
1258
Baby Bjorn Active Carrier - With free SHIPPING!!
1260
/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/iS
1261
Baby Bjorn Active Carrier - With free SHIPPING!!
1267
/abc(?C255)de(?C)f/D
1294
Note: that { does NOT introduce a quantifier
1296
/([ab]{1,4}c|xy){4,5}?123/CD
1313
the quick brown abc\P
1315
the quick brown abxyz fox\P
1317
"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"
1367
/abc/>testsavedregex
1373
/abc/F>testsavedregex
1379
/(a|b)/S>testsavedregex
1385
/(a|b)/SF>testsavedregex
1391
~<(\w+)/?>(.)*</(\1)>~smg
1392
<!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>
1396
/ End of testinput2 /