| 549 |
the first newline in the subject string, though the matched text may continue |
the first newline in the subject string, though the matched text may continue |
| 550 |
over the newline. |
over the newline. |
| 551 |
.sp |
.sp |
| 552 |
|
PCRE_JAVASCRIPT_COMPAT |
| 553 |
|
.sp |
| 554 |
|
If this option is set, PCRE's behaviour is changed in some ways so that it is |
| 555 |
|
compatible with JavaScript rather than Perl. The changes are as follows: |
| 556 |
|
.P |
| 557 |
|
(1) A lone closing square bracket in a pattern causes a compile-time error, |
| 558 |
|
because this is illegal in JavaScript (by default it is treated as a data |
| 559 |
|
character). Thus, the pattern AB]CD becomes illegal when this option is set. |
| 560 |
|
.P |
| 561 |
|
(2) At run time, a back reference to an unset subpattern group matches an empty |
| 562 |
|
string (by default this causes the current matching path to fail). A pattern |
| 563 |
|
such as (\1)(a) succeeds when this option is set (assuming it can find an "a" |
| 564 |
|
in the subject), whereas it fails by default, for Perl compatibility. |
| 565 |
|
.sp |
| 566 |
PCRE_MULTILINE |
PCRE_MULTILINE |
| 567 |
.sp |
.sp |
| 568 |
By default, PCRE treats the subject string as consisting of a single line of |
By default, PCRE treats the subject string as consisting of a single line of |
| 731 |
54 DEFINE group contains more than one branch |
54 DEFINE group contains more than one branch |
| 732 |
55 repeating a DEFINE group is not allowed |
55 repeating a DEFINE group is not allowed |
| 733 |
56 inconsistent NEWLINE options |
56 inconsistent NEWLINE options |
| 734 |
57 \eg is not followed by a braced name or an optionally braced |
57 \eg is not followed by a braced, angle-bracketed, or quoted |
| 735 |
non-zero number |
name/number or by a plain number |
| 736 |
58 (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number |
58 a numbered reference must not be zero |
| 737 |
59 (*VERB) with an argument is not supported |
59 (*VERB) with an argument is not supported |
| 738 |
60 (*VERB) not recognized |
60 (*VERB) not recognized |
| 739 |
61 number is too big |
61 number is too big |
| 740 |
62 subpattern name expected |
62 subpattern name expected |
| 741 |
63 digit expected after (?+ |
63 digit expected after (?+ |
| 742 |
|
64 ] is an invalid data character in JavaScript compatibility mode |
| 743 |
.sp |
.sp |
| 744 |
The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may |
The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may |
| 745 |
be used if the limits were changed when PCRE was built. |
be used if the limits were changed when PCRE was built. |
| 1975 |
.rs |
.rs |
| 1976 |
.sp |
.sp |
| 1977 |
.nf |
.nf |
| 1978 |
Last updated: 23 January 2008 |
Last updated: 12 April 2008 |
| 1979 |
Copyright (c) 1997-2008 University of Cambridge. |
Copyright (c) 1997-2008 University of Cambridge. |
| 1980 |
.fi |
.fi |