| 1 |
nigel |
29 |
PCRE version 2.03 12-Feb-1999 |
| 2 |
nigel |
3 |
|
| 3 |
|
|
/(a)b|/ |
| 4 |
|
|
Identifying subpattern count = 1 |
| 5 |
|
|
No options |
| 6 |
|
|
No first char |
| 7 |
|
|
|
| 8 |
|
|
/abc/ |
| 9 |
|
|
Identifying subpattern count = 0 |
| 10 |
|
|
No options |
| 11 |
|
|
First char = 'a' |
| 12 |
|
|
abc |
| 13 |
|
|
0: abc |
| 14 |
|
|
defabc |
| 15 |
|
|
0: abc |
| 16 |
|
|
\Aabc |
| 17 |
|
|
0: abc |
| 18 |
|
|
*** Failers |
| 19 |
|
|
No match |
| 20 |
|
|
\Adefabc |
| 21 |
|
|
No match |
| 22 |
|
|
ABC |
| 23 |
|
|
No match |
| 24 |
|
|
|
| 25 |
|
|
/^abc/ |
| 26 |
|
|
Identifying subpattern count = 0 |
| 27 |
|
|
Options: anchored |
| 28 |
|
|
No first char |
| 29 |
|
|
abc |
| 30 |
|
|
0: abc |
| 31 |
|
|
\Aabc |
| 32 |
|
|
0: abc |
| 33 |
|
|
*** Failers |
| 34 |
|
|
No match |
| 35 |
|
|
defabc |
| 36 |
|
|
No match |
| 37 |
|
|
\Adefabc |
| 38 |
|
|
No match |
| 39 |
|
|
|
| 40 |
|
|
/a+bc/ |
| 41 |
|
|
Identifying subpattern count = 0 |
| 42 |
|
|
No options |
| 43 |
|
|
First char = 'a' |
| 44 |
|
|
|
| 45 |
|
|
/a*bc/ |
| 46 |
|
|
Identifying subpattern count = 0 |
| 47 |
|
|
No options |
| 48 |
|
|
No first char |
| 49 |
|
|
|
| 50 |
|
|
/a{3}bc/ |
| 51 |
|
|
Identifying subpattern count = 0 |
| 52 |
|
|
No options |
| 53 |
|
|
First char = 'a' |
| 54 |
|
|
|
| 55 |
|
|
/(abc|a+z)/ |
| 56 |
|
|
Identifying subpattern count = 1 |
| 57 |
|
|
No options |
| 58 |
|
|
First char = 'a' |
| 59 |
|
|
|
| 60 |
|
|
/^abc$/ |
| 61 |
|
|
Identifying subpattern count = 0 |
| 62 |
|
|
Options: anchored |
| 63 |
|
|
No first char |
| 64 |
|
|
abc |
| 65 |
|
|
0: abc |
| 66 |
|
|
*** Failers |
| 67 |
|
|
No match |
| 68 |
|
|
def\nabc |
| 69 |
|
|
No match |
| 70 |
|
|
|
| 71 |
|
|
/ab\gdef/X |
| 72 |
|
|
Failed: unrecognized character follows \ at offset 3 |
| 73 |
|
|
|
| 74 |
nigel |
19 |
/(?X)ab\gdef/X |
| 75 |
|
|
Failed: unrecognized character follows \ at offset 7 |
| 76 |
|
|
|
| 77 |
nigel |
3 |
/x{5,4}/ |
| 78 |
|
|
Failed: numbers out of order in {} quantifier at offset 5 |
| 79 |
|
|
|
| 80 |
|
|
/z{65536}/ |
| 81 |
|
|
Failed: number too big in {} quantifier at offset 7 |
| 82 |
|
|
|
| 83 |
|
|
/[abcd/ |
| 84 |
|
|
Failed: missing terminating ] for character class at offset 5 |
| 85 |
|
|
|
| 86 |
|
|
/[\B]/ |
| 87 |
|
|
Failed: invalid escape sequence in character class at offset 2 |
| 88 |
|
|
|
| 89 |
|
|
/[a-\w]/ |
| 90 |
|
|
Failed: invalid escape sequence in character class at offset 4 |
| 91 |
|
|
|
| 92 |
|
|
/[z-a]/ |
| 93 |
|
|
Failed: range out of order in character class at offset 3 |
| 94 |
|
|
|
| 95 |
|
|
/^*/ |
| 96 |
|
|
Failed: nothing to repeat at offset 1 |
| 97 |
|
|
|
| 98 |
|
|
/(abc/ |
| 99 |
|
|
Failed: missing ) at offset 4 |
| 100 |
|
|
|
| 101 |
|
|
/(?# abc/ |
| 102 |
|
|
Failed: missing ) after comment at offset 7 |
| 103 |
|
|
|
| 104 |
|
|
/(?z)abc/ |
| 105 |
|
|
Failed: unrecognized character after (? at offset 2 |
| 106 |
|
|
|
| 107 |
|
|
/.*b/ |
| 108 |
|
|
Identifying subpattern count = 0 |
| 109 |
|
|
Options: anchored |
| 110 |
|
|
No first char |
| 111 |
|
|
|
| 112 |
|
|
/.*?b/ |
| 113 |
|
|
Identifying subpattern count = 0 |
| 114 |
|
|
Options: anchored |
| 115 |
|
|
No first char |
| 116 |
|
|
|
| 117 |
|
|
/cat|dog|elephant/ |
| 118 |
|
|
Identifying subpattern count = 0 |
| 119 |
|
|
No options |
| 120 |
|
|
No first char |
| 121 |
|
|
this sentence eventually mentions a cat |
| 122 |
|
|
0: cat |
| 123 |
|
|
this sentences rambles on and on for a while and then reaches elephant |
| 124 |
|
|
0: elephant |
| 125 |
|
|
|
| 126 |
|
|
/cat|dog|elephant/S |
| 127 |
|
|
Identifying subpattern count = 0 |
| 128 |
|
|
No options |
| 129 |
|
|
No first char |
| 130 |
|
|
Starting character set: c d e |
| 131 |
|
|
this sentence eventually mentions a cat |
| 132 |
|
|
0: cat |
| 133 |
|
|
this sentences rambles on and on for a while and then reaches elephant |
| 134 |
|
|
0: elephant |
| 135 |
|
|
|
| 136 |
|
|
/cat|dog|elephant/iS |
| 137 |
|
|
Identifying subpattern count = 0 |
| 138 |
|
|
Options: caseless |
| 139 |
|
|
No first char |
| 140 |
|
|
Starting character set: C D E c d e |
| 141 |
|
|
this sentence eventually mentions a CAT cat |
| 142 |
|
|
0: CAT |
| 143 |
|
|
this sentences rambles on and on for a while to elephant ElePhant |
| 144 |
|
|
0: elephant |
| 145 |
|
|
|
| 146 |
|
|
/a|[bcd]/S |
| 147 |
|
|
Identifying subpattern count = 0 |
| 148 |
|
|
No options |
| 149 |
|
|
No first char |
| 150 |
|
|
Starting character set: a b c d |
| 151 |
|
|
|
| 152 |
|
|
/(a|[^\dZ])/S |
| 153 |
|
|
Identifying subpattern count = 1 |
| 154 |
|
|
No options |
| 155 |
|
|
No first char |
| 156 |
|
|
Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a |
| 157 |
|
|
\x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 |
| 158 |
|
|
\x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = > |
| 159 |
|
|
? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y [ \ ] ^ _ ` a b c d |
| 160 |
|
|
e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \x80 \x81 \x82 \x83 |
| 161 |
|
|
\x84 \x85 \x86 \x87 \x88 \x89 \x8a \x8b \x8c \x8d \x8e \x8f \x90 \x91 \x92 |
| 162 |
|
|
\x93 \x94 \x95 \x96 \x97 \x98 \x99 \x9a \x9b \x9c \x9d \x9e \x9f \xa0 \xa1 |
| 163 |
|
|
\xa2 \xa3 \xa4 \xa5 \xa6 \xa7 \xa8 \xa9 \xaa \xab \xac \xad \xae \xaf \xb0 |
| 164 |
|
|
\xb1 \xb2 \xb3 \xb4 \xb5 \xb6 \xb7 \xb8 \xb9 \xba \xbb \xbc \xbd \xbe \xbf |
| 165 |
|
|
\xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce |
| 166 |
|
|
\xcf \xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd |
| 167 |
|
|
\xde \xdf \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec |
| 168 |
|
|
\xed \xee \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb |
| 169 |
|
|
\xfc \xfd \xfe \xff |
| 170 |
|
|
|
| 171 |
|
|
/(a|b)*[\s]/S |
| 172 |
|
|
Identifying subpattern count = 1 |
| 173 |
|
|
No options |
| 174 |
|
|
No first char |
| 175 |
|
|
Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b |
| 176 |
|
|
|
| 177 |
|
|
/(ab\2)/ |
| 178 |
nigel |
23 |
Failed: back reference to non-existent subpattern at offset 6 |
| 179 |
nigel |
3 |
|
| 180 |
|
|
/{4,5}abc/ |
| 181 |
|
|
Failed: nothing to repeat at offset 4 |
| 182 |
|
|
|
| 183 |
|
|
/(a)(b)(c)\2/ |
| 184 |
|
|
Identifying subpattern count = 3 |
| 185 |
|
|
No options |
| 186 |
|
|
First char = 'a' |
| 187 |
|
|
abcb |
| 188 |
|
|
0: abcb |
| 189 |
|
|
1: a |
| 190 |
|
|
2: b |
| 191 |
|
|
3: c |
| 192 |
|
|
\O0abcb |
| 193 |
|
|
Matched, but too many substrings |
| 194 |
nigel |
23 |
\O3abcb |
| 195 |
nigel |
3 |
Matched, but too many substrings |
| 196 |
|
|
0: abcb |
| 197 |
nigel |
23 |
\O6abcb |
| 198 |
nigel |
3 |
Matched, but too many substrings |
| 199 |
|
|
0: abcb |
| 200 |
|
|
1: a |
| 201 |
nigel |
23 |
\O9abcb |
| 202 |
nigel |
3 |
Matched, but too many substrings |
| 203 |
|
|
0: abcb |
| 204 |
|
|
1: a |
| 205 |
|
|
2: b |
| 206 |
nigel |
23 |
\O12abcb |
| 207 |
nigel |
3 |
0: abcb |
| 208 |
|
|
1: a |
| 209 |
|
|
2: b |
| 210 |
|
|
3: c |
| 211 |
|
|
|
| 212 |
|
|
/(a)bc|(a)(b)\2/ |
| 213 |
|
|
Identifying subpattern count = 3 |
| 214 |
|
|
No options |
| 215 |
|
|
First char = 'a' |
| 216 |
|
|
abc |
| 217 |
|
|
0: abc |
| 218 |
|
|
1: a |
| 219 |
|
|
\O0abc |
| 220 |
|
|
Matched, but too many substrings |
| 221 |
nigel |
23 |
\O3abc |
| 222 |
nigel |
3 |
Matched, but too many substrings |
| 223 |
|
|
0: abc |
| 224 |
nigel |
23 |
\O6abc |
| 225 |
nigel |
3 |
0: abc |
| 226 |
|
|
1: a |
| 227 |
|
|
aba |
| 228 |
|
|
0: aba |
| 229 |
|
|
1: <unset> |
| 230 |
|
|
2: a |
| 231 |
|
|
3: b |
| 232 |
|
|
\O0aba |
| 233 |
|
|
Matched, but too many substrings |
| 234 |
nigel |
23 |
\O3aba |
| 235 |
nigel |
3 |
Matched, but too many substrings |
| 236 |
|
|
0: aba |
| 237 |
nigel |
23 |
\O6aba |
| 238 |
nigel |
3 |
Matched, but too many substrings |
| 239 |
|
|
0: aba |
| 240 |
|
|
1: <unset> |
| 241 |
nigel |
23 |
\O9aba |
| 242 |
nigel |
3 |
Matched, but too many substrings |
| 243 |
|
|
0: aba |
| 244 |
|
|
1: <unset> |
| 245 |
|
|
2: a |
| 246 |
nigel |
23 |
\O12aba |
| 247 |
nigel |
3 |
0: aba |
| 248 |
|
|
1: <unset> |
| 249 |
|
|
2: a |
| 250 |
|
|
3: b |
| 251 |
|
|
|
| 252 |
|
|
/abc$/E |
| 253 |
|
|
Identifying subpattern count = 0 |
| 254 |
|
|
Options: dollar_endonly |
| 255 |
|
|
First char = 'a' |
| 256 |
|
|
abc |
| 257 |
|
|
0: abc |
| 258 |
|
|
*** Failers |
| 259 |
|
|
No match |
| 260 |
|
|
abc\n |
| 261 |
|
|
No match |
| 262 |
|
|
abc\ndef |
| 263 |
|
|
No match |
| 264 |
|
|
|
| 265 |
|
|
/(a)(b)(c)(d)(e)\6/ |
| 266 |
nigel |
23 |
Failed: back reference to non-existent subpattern at offset 17 |
| 267 |
nigel |
3 |
|
| 268 |
|
|
/the quick brown fox/ |
| 269 |
|
|
Identifying subpattern count = 0 |
| 270 |
|
|
No options |
| 271 |
|
|
First char = 't' |
| 272 |
|
|
the quick brown fox |
| 273 |
|
|
0: the quick brown fox |
| 274 |
|
|
this is a line with the quick brown fox |
| 275 |
|
|
0: the quick brown fox |
| 276 |
|
|
|
| 277 |
|
|
/the quick brown fox/A |
| 278 |
|
|
Identifying subpattern count = 0 |
| 279 |
|
|
Options: anchored |
| 280 |
|
|
No first char |
| 281 |
|
|
the quick brown fox |
| 282 |
|
|
0: the quick brown fox |
| 283 |
|
|
*** Failers |
| 284 |
|
|
No match |
| 285 |
|
|
this is a line with the quick brown fox |
| 286 |
|
|
No match |
| 287 |
|
|
|
| 288 |
|
|
/ab(?z)cd/ |
| 289 |
|
|
Failed: unrecognized character after (? at offset 4 |
| 290 |
|
|
|
| 291 |
|
|
/^abc|def/ |
| 292 |
|
|
Identifying subpattern count = 0 |
| 293 |
|
|
No options |
| 294 |
|
|
No first char |
| 295 |
|
|
abcdef |
| 296 |
|
|
0: abc |
| 297 |
|
|
abcdef\B |
| 298 |
|
|
0: def |
| 299 |
|
|
|
| 300 |
|
|
/.*((abc)$|(def))/ |
| 301 |
|
|
Identifying subpattern count = 3 |
| 302 |
|
|
Options: anchored |
| 303 |
|
|
No first char |
| 304 |
|
|
defabc |
| 305 |
|
|
0: defabc |
| 306 |
|
|
1: abc |
| 307 |
|
|
2: abc |
| 308 |
|
|
\Zdefabc |
| 309 |
|
|
0: def |
| 310 |
|
|
1: def |
| 311 |
|
|
2: <unset> |
| 312 |
|
|
3: def |
| 313 |
|
|
|
| 314 |
|
|
/abc/P |
| 315 |
|
|
abc |
| 316 |
|
|
0: abc |
| 317 |
|
|
*** Failers |
| 318 |
|
|
No match: POSIX code 17: match failed |
| 319 |
|
|
|
| 320 |
|
|
/^abc|def/P |
| 321 |
|
|
abcdef |
| 322 |
|
|
0: abc |
| 323 |
|
|
abcdef\B |
| 324 |
|
|
0: def |
| 325 |
|
|
|
| 326 |
|
|
/.*((abc)$|(def))/P |
| 327 |
|
|
defabc |
| 328 |
|
|
0: defabc |
| 329 |
|
|
1: abc |
| 330 |
|
|
2: abc |
| 331 |
|
|
\Zdefabc |
| 332 |
|
|
0: def |
| 333 |
|
|
1: def |
| 334 |
|
|
3: def |
| 335 |
|
|
|
| 336 |
|
|
/the quick brown fox/P |
| 337 |
|
|
the quick brown fox |
| 338 |
|
|
0: the quick brown fox |
| 339 |
|
|
*** Failers |
| 340 |
|
|
No match: POSIX code 17: match failed |
| 341 |
|
|
The Quick Brown Fox |
| 342 |
|
|
No match: POSIX code 17: match failed |
| 343 |
|
|
|
| 344 |
|
|
/the quick brown fox/Pi |
| 345 |
|
|
the quick brown fox |
| 346 |
|
|
0: the quick brown fox |
| 347 |
|
|
The Quick Brown Fox |
| 348 |
|
|
0: The Quick Brown Fox |
| 349 |
|
|
|
| 350 |
|
|
/abc.def/P |
| 351 |
|
|
*** Failers |
| 352 |
|
|
No match: POSIX code 17: match failed |
| 353 |
|
|
abc\ndef |
| 354 |
|
|
No match: POSIX code 17: match failed |
| 355 |
|
|
|
| 356 |
|
|
/abc$/P |
| 357 |
|
|
abc |
| 358 |
|
|
0: abc |
| 359 |
|
|
abc\n |
| 360 |
|
|
0: abc |
| 361 |
|
|
|
| 362 |
|
|
/(abc)\2/P |
| 363 |
nigel |
23 |
Failed: POSIX code 15: bad back reference at offset 7 |
| 364 |
nigel |
3 |
|
| 365 |
|
|
/(abc\1)/P |
| 366 |
|
|
abc |
| 367 |
nigel |
23 |
No match: POSIX code 17: match failed |
| 368 |
nigel |
3 |
|
| 369 |
nigel |
9 |
/)/ |
| 370 |
nigel |
23 |
Failed: unmatched parentheses at offset 0 |
| 371 |
nigel |
9 |
|
| 372 |
|
|
/a[]b/ |
| 373 |
|
|
Failed: missing terminating ] for character class at offset 4 |
| 374 |
|
|
|
| 375 |
nigel |
13 |
/[^aeiou ]{3,}/ |
| 376 |
|
|
Identifying subpattern count = 0 |
| 377 |
|
|
No options |
| 378 |
|
|
No first char |
| 379 |
|
|
co-processors, and for |
| 380 |
|
|
0: -pr |
| 381 |
nigel |
17 |
|
| 382 |
nigel |
19 |
/<.*>/ |
| 383 |
|
|
Identifying subpattern count = 0 |
| 384 |
|
|
No options |
| 385 |
|
|
First char = '<' |
| 386 |
|
|
abc<def>ghi<klm>nop |
| 387 |
|
|
0: <def>ghi<klm> |
| 388 |
|
|
|
| 389 |
|
|
/<.*?>/ |
| 390 |
|
|
Identifying subpattern count = 0 |
| 391 |
|
|
No options |
| 392 |
|
|
First char = '<' |
| 393 |
|
|
abc<def>ghi<klm>nop |
| 394 |
|
|
0: <def> |
| 395 |
|
|
|
| 396 |
|
|
/<.*>/U |
| 397 |
|
|
Identifying subpattern count = 0 |
| 398 |
|
|
Options: ungreedy |
| 399 |
|
|
First char = '<' |
| 400 |
|
|
abc<def>ghi<klm>nop |
| 401 |
|
|
0: <def> |
| 402 |
|
|
|
| 403 |
|
|
/<.*>(?U)/ |
| 404 |
|
|
Identifying subpattern count = 0 |
| 405 |
|
|
Options: ungreedy |
| 406 |
|
|
First char = '<' |
| 407 |
|
|
abc<def>ghi<klm>nop |
| 408 |
|
|
0: <def> |
| 409 |
|
|
|
| 410 |
|
|
/<.*?>/U |
| 411 |
|
|
Identifying subpattern count = 0 |
| 412 |
|
|
Options: ungreedy |
| 413 |
|
|
First char = '<' |
| 414 |
|
|
abc<def>ghi<klm>nop |
| 415 |
|
|
0: <def>ghi<klm> |
| 416 |
|
|
|
| 417 |
|
|
/={3,}/U |
| 418 |
|
|
Identifying subpattern count = 0 |
| 419 |
|
|
Options: ungreedy |
| 420 |
|
|
First char = '=' |
| 421 |
|
|
abc========def |
| 422 |
|
|
0: === |
| 423 |
|
|
|
| 424 |
|
|
/(?U)={3,}?/ |
| 425 |
|
|
Identifying subpattern count = 0 |
| 426 |
|
|
Options: ungreedy |
| 427 |
|
|
First char = '=' |
| 428 |
|
|
abc========def |
| 429 |
|
|
0: ======== |
| 430 |
nigel |
23 |
|
| 431 |
|
|
/(?<!bar|cattle)foo/ |
| 432 |
|
|
Identifying subpattern count = 0 |
| 433 |
|
|
No options |
| 434 |
|
|
First char = 'f' |
| 435 |
|
|
foo |
| 436 |
|
|
0: foo |
| 437 |
|
|
catfoo |
| 438 |
|
|
0: foo |
| 439 |
|
|
*** Failers |
| 440 |
|
|
No match |
| 441 |
|
|
the barfoo |
| 442 |
|
|
No match |
| 443 |
|
|
and cattlefoo |
| 444 |
|
|
No match |
| 445 |
nigel |
19 |
|
| 446 |
nigel |
23 |
/(?<=a+)b/ |
| 447 |
|
|
Failed: lookbehind assertion is not fixed length at offset 6 |
| 448 |
|
|
|
| 449 |
|
|
/(?<=aaa|b{0,3})b/ |
| 450 |
|
|
Failed: lookbehind assertion is not fixed length at offset 14 |
| 451 |
|
|
|
| 452 |
|
|
/(?<!(foo)a\1)bar/ |
| 453 |
|
|
Failed: lookbehind assertion is not fixed length at offset 12 |
| 454 |
|
|
|
| 455 |
|
|
/(?i)abc/ |
| 456 |
|
|
Identifying subpattern count = 0 |
| 457 |
|
|
Options: caseless |
| 458 |
|
|
First char = 'a' |
| 459 |
|
|
|
| 460 |
|
|
/(a|(?m)a)/ |
| 461 |
|
|
Identifying subpattern count = 1 |
| 462 |
|
|
No options |
| 463 |
|
|
First char = 'a' |
| 464 |
|
|
|
| 465 |
|
|
/(?i)^1234/ |
| 466 |
|
|
Identifying subpattern count = 0 |
| 467 |
|
|
Options: anchored caseless |
| 468 |
|
|
No first char |
| 469 |
|
|
|
| 470 |
|
|
/(^b|(?i)^d)/ |
| 471 |
|
|
Identifying subpattern count = 1 |
| 472 |
|
|
Options: anchored |
| 473 |
|
|
No first char |
| 474 |
|
|
|
| 475 |
|
|
/(?s).*/ |
| 476 |
|
|
Identifying subpattern count = 0 |
| 477 |
|
|
Options: anchored dotall |
| 478 |
|
|
No first char |
| 479 |
|
|
|
| 480 |
|
|
/[abcd]/S |
| 481 |
|
|
Identifying subpattern count = 0 |
| 482 |
|
|
No options |
| 483 |
|
|
No first char |
| 484 |
|
|
Starting character set: a b c d |
| 485 |
|
|
|
| 486 |
|
|
/(?i)[abcd]/S |
| 487 |
|
|
Identifying subpattern count = 0 |
| 488 |
|
|
Options: caseless |
| 489 |
|
|
No first char |
| 490 |
|
|
Starting character set: A B C D a b c d |
| 491 |
|
|
|
| 492 |
|
|
/(?m)[xy]|(b|c)/S |
| 493 |
|
|
Identifying subpattern count = 1 |
| 494 |
|
|
Options: multiline |
| 495 |
|
|
No first char |
| 496 |
|
|
Starting character set: b c x y |
| 497 |
|
|
|
| 498 |
|
|
/(^a|^b)/m |
| 499 |
|
|
Identifying subpattern count = 1 |
| 500 |
|
|
Options: multiline |
| 501 |
|
|
First char at start or follows \n |
| 502 |
|
|
|
| 503 |
|
|
/(?i)(^a|^b)/m |
| 504 |
|
|
Identifying subpattern count = 1 |
| 505 |
|
|
Options: caseless multiline |
| 506 |
|
|
First char at start or follows \n |
| 507 |
|
|
|
| 508 |
|
|
/(a)(?(1)a|b|c)/ |
| 509 |
|
|
Failed: conditional group contains more than two branches at offset 13 |
| 510 |
|
|
|
| 511 |
|
|
/(?(?=a)a|b|c)/ |
| 512 |
|
|
Failed: conditional group contains more than two branches at offset 12 |
| 513 |
|
|
|
| 514 |
|
|
/(?(1a)/ |
| 515 |
|
|
Failed: malformed number after (?( at offset 4 |
| 516 |
|
|
|
| 517 |
|
|
/(?(?i))/ |
| 518 |
|
|
Failed: assertion expected after (?( at offset 3 |
| 519 |
|
|
|
| 520 |
|
|
/(?(abc))/ |
| 521 |
|
|
Failed: assertion expected after (?( at offset 3 |
| 522 |
|
|
|
| 523 |
|
|
/(?(?<ab))/ |
| 524 |
|
|
Failed: unrecognized character after (?< at offset 2 |
| 525 |
|
|
|
| 526 |
|
|
/((?s)blah)\s+\1/ |
| 527 |
|
|
Identifying subpattern count = 1 |
| 528 |
|
|
No options |
| 529 |
|
|
First char = 'b' |
| 530 |
|
|
|
| 531 |
|
|
/((?i)blah)\s+\1/ |
| 532 |
|
|
Identifying subpattern count = 1 |
| 533 |
|
|
No options |
| 534 |
|
|
No first char |
| 535 |
|
|
|
| 536 |
|
|
/((?i)b)/DS |
| 537 |
|
|
------------------------------------------------------------------ |
| 538 |
|
|
0 16 Bra 0 |
| 539 |
|
|
3 8 Bra 1 |
| 540 |
|
|
6 01 Opt |
| 541 |
|
|
8 1 b |
| 542 |
|
|
11 8 Ket |
| 543 |
|
|
14 00 Opt |
| 544 |
|
|
16 16 Ket |
| 545 |
|
|
19 End |
| 546 |
|
|
------------------------------------------------------------------ |
| 547 |
|
|
Identifying subpattern count = 1 |
| 548 |
|
|
No options |
| 549 |
|
|
No first char |
| 550 |
|
|
Starting character set: B b |
| 551 |
|
|
|
| 552 |
|
|
/(a*b|(?i:c*(?-i)d))/S |
| 553 |
|
|
Identifying subpattern count = 1 |
| 554 |
|
|
No options |
| 555 |
|
|
No first char |
| 556 |
|
|
Starting character set: C a b c d |
| 557 |
|
|
|
| 558 |
|
|
/a$/ |
| 559 |
|
|
Identifying subpattern count = 0 |
| 560 |
|
|
No options |
| 561 |
|
|
First char = 'a' |
| 562 |
|
|
a |
| 563 |
|
|
0: a |
| 564 |
|
|
a\n |
| 565 |
|
|
0: a |
| 566 |
|
|
*** Failers |
| 567 |
|
|
No match |
| 568 |
|
|
\Za |
| 569 |
|
|
No match |
| 570 |
|
|
\Za\n |
| 571 |
|
|
No match |
| 572 |
|
|
|
| 573 |
|
|
/a$/m |
| 574 |
|
|
Identifying subpattern count = 0 |
| 575 |
|
|
Options: multiline |
| 576 |
|
|
First char = 'a' |
| 577 |
|
|
a |
| 578 |
|
|
0: a |
| 579 |
|
|
a\n |
| 580 |
|
|
0: a |
| 581 |
|
|
\Za\n |
| 582 |
|
|
0: a |
| 583 |
|
|
*** Failers |
| 584 |
|
|
No match |
| 585 |
|
|
\Za |
| 586 |
|
|
No match |
| 587 |
|
|
|
| 588 |
|
|
/\Aabc/m |
| 589 |
|
|
Identifying subpattern count = 0 |
| 590 |
|
|
Options: anchored multiline |
| 591 |
|
|
No first char |
| 592 |
|
|
|
| 593 |
|
|
/^abc/m |
| 594 |
|
|
Identifying subpattern count = 0 |
| 595 |
|
|
Options: multiline |
| 596 |
|
|
First char at start or follows \n |
| 597 |
|
|
|
| 598 |
|
|
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/ |
| 599 |
|
|
Identifying subpattern count = 5 |
| 600 |
|
|
Options: anchored |
| 601 |
|
|
No first char |
| 602 |
|
|
aaaaabbbbbcccccdef |
| 603 |
|
|
0: aaaaabbbbbcccccdef |
| 604 |
|
|
1: aaaaabbbbbcccccdef |
| 605 |
|
|
2: aaaaa |
| 606 |
|
|
3: b |
| 607 |
|
|
4: bbbbccccc |
| 608 |
|
|
5: def |
| 609 |
|
|
|
| 610 |
|
|
/(?<=foo)[ab]/S |
| 611 |
|
|
Identifying subpattern count = 0 |
| 612 |
|
|
No options |
| 613 |
|
|
No first char |
| 614 |
|
|
Starting character set: a b |
| 615 |
|
|
|
| 616 |
|
|
/(?<!foo)(alpha|omega)/S |
| 617 |
|
|
Identifying subpattern count = 1 |
| 618 |
|
|
No options |
| 619 |
|
|
No first char |
| 620 |
|
|
Starting character set: a o |
| 621 |
|
|
|
| 622 |
|
|
/(?!alphabet)[ab]/S |
| 623 |
|
|
Identifying subpattern count = 0 |
| 624 |
|
|
No options |
| 625 |
|
|
No first char |
| 626 |
|
|
Starting character set: a b |
| 627 |
|
|
|
| 628 |
|
|
/(?<=foo\n)^bar/m |
| 629 |
|
|
Identifying subpattern count = 0 |
| 630 |
|
|
Options: multiline |
| 631 |
|
|
First char at start or follows \n |
| 632 |
|
|
|
| 633 |
|
|
/(?>^abc)/m |
| 634 |
|
|
Identifying subpattern count = 0 |
| 635 |
|
|
Options: multiline |
| 636 |
|
|
First char at start or follows \n |
| 637 |
|
|
abc |
| 638 |
|
|
0: abc |
| 639 |
|
|
def\nabc |
| 640 |
|
|
0: abc |
| 641 |
|
|
*** Failers |
| 642 |
|
|
No match |
| 643 |
|
|
defabc |
| 644 |
|
|
No match |
| 645 |
|
|
|
| 646 |
|
|
/(?<=ab(c+)d)ef/ |
| 647 |
|
|
Failed: lookbehind assertion is not fixed length at offset 11 |
| 648 |
|
|
|
| 649 |
|
|
/(?<=ab(?<=c+)d)ef/ |
| 650 |
|
|
Failed: lookbehind assertion is not fixed length at offset 12 |
| 651 |
|
|
|
| 652 |
|
|
/(?<=ab(c|de)f)g/ |
| 653 |
|
|
Failed: lookbehind assertion is not fixed length at offset 13 |
| 654 |
|
|
|
| 655 |
nigel |
29 |
/The next three are in testinput2 because they have variable length branches/ |
| 656 |
nigel |
23 |
Identifying subpattern count = 0 |
| 657 |
|
|
No options |
| 658 |
|
|
First char = 'T' |
| 659 |
|
|
|
| 660 |
|
|
/(?<=bullock|donkey)-cart/ |
| 661 |
|
|
Identifying subpattern count = 0 |
| 662 |
|
|
No options |
| 663 |
|
|
First char = '-' |
| 664 |
|
|
the bullock-cart |
| 665 |
|
|
0: -cart |
| 666 |
|
|
a donkey-cart race |
| 667 |
|
|
0: -cart |
| 668 |
|
|
*** Failers |
| 669 |
|
|
No match |
| 670 |
|
|
cart |
| 671 |
|
|
No match |
| 672 |
|
|
horse-and-cart |
| 673 |
|
|
No match |
| 674 |
|
|
|
| 675 |
|
|
/(?<=ab(?i)x|y|z)/ |
| 676 |
|
|
Identifying subpattern count = 0 |
| 677 |
|
|
No options |
| 678 |
|
|
No first char |
| 679 |
|
|
|
| 680 |
nigel |
29 |
/(?>.*)(?<=(abcd)|(xyz))/ |
| 681 |
|
|
Identifying subpattern count = 2 |
| 682 |
|
|
Options: anchored |
| 683 |
|
|
No first char |
| 684 |
|
|
alphabetabcd |
| 685 |
|
|
0: alphabetabcd |
| 686 |
|
|
1: abcd |
| 687 |
|
|
endingxyz |
| 688 |
|
|
0: endingxyz |
| 689 |
|
|
1: <unset> |
| 690 |
|
|
2: xyz |
| 691 |
|
|
|
| 692 |
nigel |
23 |
/(?<=ab(?i)x(?-i)y|(?i)z|b)ZZ/ |
| 693 |
|
|
Identifying subpattern count = 0 |
| 694 |
|
|
No options |
| 695 |
|
|
First char = 'Z' |
| 696 |
|
|
abxyZZ |
| 697 |
|
|
0: ZZ |
| 698 |
|
|
abXyZZ |
| 699 |
|
|
0: ZZ |
| 700 |
|
|
ZZZ |
| 701 |
|
|
0: ZZ |
| 702 |
|
|
zZZ |
| 703 |
|
|
0: ZZ |
| 704 |
|
|
bZZ |
| 705 |
|
|
0: ZZ |
| 706 |
|
|
BZZ |
| 707 |
|
|
0: ZZ |
| 708 |
|
|
*** Failers |
| 709 |
|
|
No match |
| 710 |
|
|
ZZ |
| 711 |
|
|
No match |
| 712 |
|
|
abXYZZ |
| 713 |
|
|
No match |
| 714 |
|
|
zzz |
| 715 |
|
|
No match |
| 716 |
|
|
bzz |
| 717 |
|
|
No match |
| 718 |
|
|
|
| 719 |
|
|
/(?<!(foo)a)bar/ |
| 720 |
|
|
Identifying subpattern count = 1 |
| 721 |
|
|
No options |
| 722 |
|
|
First char = 'b' |
| 723 |
|
|
bar |
| 724 |
|
|
0: bar |
| 725 |
|
|
foobbar |
| 726 |
|
|
0: bar |
| 727 |
|
|
*** Failers |
| 728 |
|
|
No match |
| 729 |
|
|
fooabar |
| 730 |
|
|
No match |
| 731 |
|
|
|
| 732 |
|
|
/This one is here because Perl 5.005_02 doesn't fail it/ |
| 733 |
|
|
Identifying subpattern count = 0 |
| 734 |
|
|
No options |
| 735 |
|
|
First char = 'T' |
| 736 |
|
|
|
| 737 |
|
|
/^(a)?(?(1)a|b)+$/ |
| 738 |
|
|
Identifying subpattern count = 1 |
| 739 |
|
|
Options: anchored |
| 740 |
|
|
No first char |
| 741 |
|
|
*** Failers |
| 742 |
|
|
No match |
| 743 |
|
|
a |
| 744 |
|
|
No match |
| 745 |
|
|
|
| 746 |
|
|
/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/ |
| 747 |
|
|
Identifying subpattern count = 0 |
| 748 |
|
|
No options |
| 749 |
|
|
First char = 'T' |
| 750 |
|
|
|
| 751 |
|
|
/^(a\1?){4}$/ |
| 752 |
|
|
Identifying subpattern count = 1 |
| 753 |
|
|
Options: anchored |
| 754 |
|
|
No first char |
| 755 |
|
|
aaaaaa |
| 756 |
|
|
0: aaaaaa |
| 757 |
|
|
1: aa |
| 758 |
|
|
|
| 759 |
|
|
/These are syntax tests from Perl 5.005/ |
| 760 |
|
|
Identifying subpattern count = 0 |
| 761 |
|
|
No options |
| 762 |
|
|
First char = 'T' |
| 763 |
|
|
|
| 764 |
|
|
/a[b-a]/ |
| 765 |
|
|
Failed: range out of order in character class at offset 4 |
| 766 |
|
|
|
| 767 |
|
|
/a[]b/ |
| 768 |
|
|
Failed: missing terminating ] for character class at offset 4 |
| 769 |
|
|
|
| 770 |
|
|
/a[/ |
| 771 |
|
|
Failed: missing terminating ] for character class at offset 2 |
| 772 |
|
|
|
| 773 |
|
|
/*a/ |
| 774 |
|
|
Failed: nothing to repeat at offset 0 |
| 775 |
|
|
|
| 776 |
|
|
/(*)b/ |
| 777 |
|
|
Failed: nothing to repeat at offset 1 |
| 778 |
|
|
|
| 779 |
|
|
/abc)/ |
| 780 |
|
|
Failed: unmatched parentheses at offset 3 |
| 781 |
|
|
|
| 782 |
|
|
/(abc/ |
| 783 |
|
|
Failed: missing ) at offset 4 |
| 784 |
|
|
|
| 785 |
|
|
/a**/ |
| 786 |
|
|
Failed: nothing to repeat at offset 2 |
| 787 |
|
|
|
| 788 |
|
|
/)(/ |
| 789 |
|
|
Failed: unmatched parentheses at offset 0 |
| 790 |
|
|
|
| 791 |
|
|
/\1/ |
| 792 |
|
|
Failed: back reference to non-existent subpattern at offset 2 |
| 793 |
|
|
|
| 794 |
|
|
/\2/ |
| 795 |
|
|
Failed: back reference to non-existent subpattern at offset 2 |
| 796 |
|
|
|
| 797 |
|
|
/(a)|\2/ |
| 798 |
|
|
Failed: back reference to non-existent subpattern at offset 6 |
| 799 |
|
|
|
| 800 |
|
|
/a[b-a]/i |
| 801 |
|
|
Failed: range out of order in character class at offset 4 |
| 802 |
|
|
|
| 803 |
|
|
/a[]b/i |
| 804 |
|
|
Failed: missing terminating ] for character class at offset 4 |
| 805 |
|
|
|
| 806 |
|
|
/a[/i |
| 807 |
|
|
Failed: missing terminating ] for character class at offset 2 |
| 808 |
|
|
|
| 809 |
|
|
/*a/i |
| 810 |
|
|
Failed: nothing to repeat at offset 0 |
| 811 |
|
|
|
| 812 |
|
|
/(*)b/i |
| 813 |
|
|
Failed: nothing to repeat at offset 1 |
| 814 |
|
|
|
| 815 |
|
|
/abc)/i |
| 816 |
|
|
Failed: unmatched parentheses at offset 3 |
| 817 |
|
|
|
| 818 |
|
|
/(abc/i |
| 819 |
|
|
Failed: missing ) at offset 4 |
| 820 |
|
|
|
| 821 |
|
|
/a**/i |
| 822 |
|
|
Failed: nothing to repeat at offset 2 |
| 823 |
|
|
|
| 824 |
|
|
/)(/i |
| 825 |
|
|
Failed: unmatched parentheses at offset 0 |
| 826 |
|
|
|
| 827 |
|
|
/:(?:/ |
| 828 |
|
|
Failed: missing ) at offset 4 |
| 829 |
|
|
|
| 830 |
|
|
/(?<%)b/ |
| 831 |
|
|
Failed: unrecognized character after (?< at offset 0 |
| 832 |
|
|
|
| 833 |
|
|
/a(?{)b/ |
| 834 |
|
|
Failed: unrecognized character after (? at offset 3 |
| 835 |
|
|
|
| 836 |
|
|
/a(?{{})b/ |
| 837 |
|
|
Failed: unrecognized character after (? at offset 3 |
| 838 |
|
|
|
| 839 |
|
|
/a(?{}})b/ |
| 840 |
|
|
Failed: unrecognized character after (? at offset 3 |
| 841 |
|
|
|
| 842 |
|
|
/a(?{"{"})b/ |
| 843 |
|
|
Failed: unrecognized character after (? at offset 3 |
| 844 |
|
|
|
| 845 |
|
|
/a(?{"{"}})b/ |
| 846 |
|
|
Failed: unrecognized character after (? at offset 3 |
| 847 |
|
|
|
| 848 |
|
|
/(?(1?)a|b)/ |
| 849 |
|
|
Failed: malformed number after (?( at offset 4 |
| 850 |
|
|
|
| 851 |
|
|
/(?(1)a|b|c)/ |
| 852 |
|
|
Failed: conditional group contains more than two branches at offset 10 |
| 853 |
|
|
|
| 854 |
|
|
/[a[:xyz:/ |
| 855 |
|
|
Failed: missing terminating ] for character class at offset 8 |
| 856 |
|
|
|
| 857 |
|
|
/(?<=x+)y/ |
| 858 |
|
|
Failed: lookbehind assertion is not fixed length at offset 6 |
| 859 |
|
|
|
| 860 |
|
|
/a{37,17}/ |
| 861 |
|
|
Failed: numbers out of order in {} quantifier at offset 7 |
| 862 |
|
|
|
| 863 |
nigel |
29 |
/abc/\ |
| 864 |
|
|
Failed: \ at end of pattern at offset 4 |
| 865 |
|
|
|
| 866 |
|
|
/abc/\P |
| 867 |
|
|
Failed: POSIX code 9: bad escape sequence at offset 4 |
| 868 |
|
|
|
| 869 |
|
|
/abc/\i |
| 870 |
|
|
Failed: \ at end of pattern at offset 4 |
| 871 |
|
|
|
| 872 |
|
|
/(a)bc(d)/ |
| 873 |
|
|
Identifying subpattern count = 2 |
| 874 |
|
|
No options |
| 875 |
|
|
First char = 'a' |
| 876 |
|
|
abcd |
| 877 |
|
|
0: abcd |
| 878 |
|
|
1: a |
| 879 |
|
|
2: d |
| 880 |
|
|
abcd\C2 |
| 881 |
|
|
0: abcd |
| 882 |
|
|
1: a |
| 883 |
|
|
2: d |
| 884 |
|
|
2C d (1) |
| 885 |
|
|
abcd\C5 |
| 886 |
|
|
0: abcd |
| 887 |
|
|
1: a |
| 888 |
|
|
2: d |
| 889 |
|
|
copy substring 5 failed -7 |
| 890 |
|
|
|
| 891 |
|
|
/(.{20})/ |
| 892 |
|
|
Identifying subpattern count = 1 |
| 893 |
|
|
No options |
| 894 |
|
|
No first char |
| 895 |
|
|
abcdefghijklmnopqrstuvwxyz |
| 896 |
|
|
0: abcdefghijklmnopqrst |
| 897 |
|
|
1: abcdefghijklmnopqrst |
| 898 |
|
|
abcdefghijklmnopqrstuvwxyz\C1 |
| 899 |
|
|
0: abcdefghijklmnopqrst |
| 900 |
|
|
1: abcdefghijklmnopqrst |
| 901 |
|
|
copy substring 1 failed -6 |
| 902 |
|
|
abcdefghijklmnopqrstuvwxyz\G1 |
| 903 |
|
|
0: abcdefghijklmnopqrst |
| 904 |
|
|
1: abcdefghijklmnopqrst |
| 905 |
|
|
1G abcdefghijklmnopqrst (20) |
| 906 |
|
|
|
| 907 |
|
|
/(.{15})/ |
| 908 |
|
|
Identifying subpattern count = 1 |
| 909 |
|
|
No options |
| 910 |
|
|
No first char |
| 911 |
|
|
abcdefghijklmnopqrstuvwxyz |
| 912 |
|
|
0: abcdefghijklmno |
| 913 |
|
|
1: abcdefghijklmno |
| 914 |
|
|
abcdefghijklmnopqrstuvwxyz\C1\G1 |
| 915 |
|
|
0: abcdefghijklmno |
| 916 |
|
|
1: abcdefghijklmno |
| 917 |
|
|
1C abcdefghijklmno (15) |
| 918 |
|
|
1G abcdefghijklmno (15) |
| 919 |
|
|
|
| 920 |
|
|
/(.{16})/ |
| 921 |
|
|
Identifying subpattern count = 1 |
| 922 |
|
|
No options |
| 923 |
|
|
No first char |
| 924 |
|
|
abcdefghijklmnopqrstuvwxyz |
| 925 |
|
|
0: abcdefghijklmnop |
| 926 |
|
|
1: abcdefghijklmnop |
| 927 |
|
|
abcdefghijklmnopqrstuvwxyz\C1\G1\L |
| 928 |
|
|
0: abcdefghijklmnop |
| 929 |
|
|
1: abcdefghijklmnop |
| 930 |
|
|
copy substring 1 failed -6 |
| 931 |
|
|
1G abcdefghijklmnop (16) |
| 932 |
|
|
0L abcdefghijklmnop |
| 933 |
|
|
1L abcdefghijklmnop |
| 934 |
|
|
|
| 935 |
|
|
/^(a|(bc))de(f)/ |
| 936 |
|
|
Identifying subpattern count = 3 |
| 937 |
|
|
Options: anchored |
| 938 |
|
|
No first char |
| 939 |
|
|
adef\G1\G2\G3\G4\L |
| 940 |
|
|
0: adef |
| 941 |
|
|
1: a |
| 942 |
|
|
2: <unset> |
| 943 |
|
|
3: f |
| 944 |
|
|
1G a (1) |
| 945 |
|
|
2G (0) |
| 946 |
|
|
3G f (1) |
| 947 |
|
|
get substring 4 failed -7 |
| 948 |
|
|
0L adef |
| 949 |
|
|
1L a |
| 950 |
|
|
2L |
| 951 |
|
|
3L f |
| 952 |
|
|
bcdef\G1\G2\G3\G4\L |
| 953 |
|
|
0: bcdef |
| 954 |
|
|
1: bc |
| 955 |
|
|
2: bc |
| 956 |
|
|
3: f |
| 957 |
|
|
1G bc (2) |
| 958 |
|
|
2G bc (2) |
| 959 |
|
|
3G f (1) |
| 960 |
|
|
get substring 4 failed -7 |
| 961 |
|
|
0L bcdef |
| 962 |
|
|
1L bc |
| 963 |
|
|
2L bc |
| 964 |
|
|
3L f |
| 965 |
|
|
adefghijk\C0 |
| 966 |
|
|
0: adef |
| 967 |
|
|
1: a |
| 968 |
|
|
2: <unset> |
| 969 |
|
|
3: f |
| 970 |
|
|
0C adef (4) |
| 971 |
|
|
|
| 972 |
|
|
/^abc\00def/ |
| 973 |
|
|
Identifying subpattern count = 0 |
| 974 |
|
|
Options: anchored |
| 975 |
|
|
No first char |
| 976 |
|
|
abc\00def\L\C0 |
| 977 |
|
|
0: abc\x00def |
| 978 |
|
|
0C abc (7) |
| 979 |
|
|
0L abc |
| 980 |
|
|
|
| 981 |
nigel |
3 |
/ End of test input / |
| 982 |
|
|
Identifying subpattern count = 0 |
| 983 |
|
|
No options |
| 984 |
|
|
First char = ' ' |
| 985 |
|
|
|