| 276 |
recognized line ending sequence, the match position advancement for a |
recognized line ending sequence, the match position advancement for a |
| 277 |
non-anchored pattern. There is more detail about this in the |
non-anchored pattern. There is more detail about this in the |
| 278 |
<a href="#execoptions">section on <b>pcre_exec()</b> options</a> |
<a href="#execoptions">section on <b>pcre_exec()</b> options</a> |
| 279 |
below. The choice of newline convention does not affect the interpretation of |
below. |
| 280 |
the \n or \r escape sequences. |
</P> |
| 281 |
|
<P> |
| 282 |
|
The choice of newline convention does not affect the interpretation of |
| 283 |
|
the \n or \r escape sequences, nor does it affect what \R matches, which is |
| 284 |
|
controlled in a similar way, but by separate options. |
| 285 |
</P> |
</P> |
| 286 |
<br><a name="SEC4" href="#TOC1">MULTITHREADING</a><br> |
<br><a name="SEC4" href="#TOC1">MULTITHREADING</a><br> |
| 287 |
<P> |
<P> |
| 336 |
are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY. The |
are: 10 for LF, 13 for CR, 3338 for CRLF, -2 for ANYCRLF, and -1 for ANY. The |
| 337 |
default should normally be the standard sequence for your operating system. |
default should normally be the standard sequence for your operating system. |
| 338 |
<pre> |
<pre> |
| 339 |
|
PCRE_CONFIG_BSR |
| 340 |
|
</pre> |
| 341 |
|
The output is an integer whose value indicates what character sequences the \R |
| 342 |
|
escape sequence matches by default. A value of 0 means that \R matches any |
| 343 |
|
Unicode line ending sequence; a value of 1 means that \R matches only CR, LF, |
| 344 |
|
or CRLF. The default can be overridden when a pattern is compiled or matched. |
| 345 |
|
<pre> |
| 346 |
PCRE_CONFIG_LINK_SIZE |
PCRE_CONFIG_LINK_SIZE |
| 347 |
</pre> |
</pre> |
| 348 |
The output is an integer that contains the number of bytes used for internal |
The output is an integer that contains the number of bytes used for internal |
| 478 |
<a href="pcrecallout.html"><b>pcrecallout</b></a> |
<a href="pcrecallout.html"><b>pcrecallout</b></a> |
| 479 |
documentation. |
documentation. |
| 480 |
<pre> |
<pre> |
| 481 |
|
PCRE_BSR_ANYCRLF |
| 482 |
|
PCRE_BSR_UNICODE |
| 483 |
|
</pre> |
| 484 |
|
These options (which are mutually exclusive) control what the \R escape |
| 485 |
|
sequence matches. The choice is either to match only CR, LF, or CRLF, or to |
| 486 |
|
match any Unicode newline sequence. The default is specified when PCRE is |
| 487 |
|
built. It can be overridden from within the pattern, or by setting an option |
| 488 |
|
when a compiled pattern is matched. |
| 489 |
|
<pre> |
| 490 |
PCRE_CASELESS |
PCRE_CASELESS |
| 491 |
</pre> |
</pre> |
| 492 |
If this bit is set, letters in the pattern match both upper and lower case |
If this bit is set, letters in the pattern match both upper and lower case |
| 717 |
53 internal error: previously-checked referenced subpattern not found |
53 internal error: previously-checked referenced subpattern not found |
| 718 |
54 DEFINE group contains more than one branch |
54 DEFINE group contains more than one branch |
| 719 |
55 repeating a DEFINE group is not allowed |
55 repeating a DEFINE group is not allowed |
| 720 |
56 inconsistent NEWLINE options" |
56 inconsistent NEWLINE options |
| 721 |
57 \g is not followed by a braced name or an optionally braced |
57 \g is not followed by a braced name or an optionally braced |
| 722 |
non-zero number |
non-zero number |
| 723 |
58 (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number |
58 (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number |
| 926 |
PCRE_INFO_HASCRORLF |
PCRE_INFO_HASCRORLF |
| 927 |
</pre> |
</pre> |
| 928 |
Return 1 if the pattern contains any explicit matches for CR or LF characters, |
Return 1 if the pattern contains any explicit matches for CR or LF characters, |
| 929 |
otherwise 0. The fourth argument should point to an <b>int</b> variable. |
otherwise 0. The fourth argument should point to an <b>int</b> variable. An |
| 930 |
|
explicit match is either a literal CR or LF character, or \r or \n. |
| 931 |
<pre> |
<pre> |
| 932 |
PCRE_INFO_JCHANGED |
PCRE_INFO_JCHANGED |
| 933 |
</pre> |
</pre> |
| 1227 |
to be anchored by virtue of its contents, it cannot be made unachored at |
to be anchored by virtue of its contents, it cannot be made unachored at |
| 1228 |
matching time. |
matching time. |
| 1229 |
<pre> |
<pre> |
| 1230 |
|
PCRE_BSR_ANYCRLF |
| 1231 |
|
PCRE_BSR_UNICODE |
| 1232 |
|
</pre> |
| 1233 |
|
These options (which are mutually exclusive) control what the \R escape |
| 1234 |
|
sequence matches. The choice is either to match only CR, LF, or CRLF, or to |
| 1235 |
|
match any Unicode newline sequence. These options override the choice that was |
| 1236 |
|
made or defaulted when the pattern was compiled. |
| 1237 |
|
<pre> |
| 1238 |
PCRE_NEWLINE_CR |
PCRE_NEWLINE_CR |
| 1239 |
PCRE_NEWLINE_LF |
PCRE_NEWLINE_LF |
| 1240 |
PCRE_NEWLINE_CRLF |
PCRE_NEWLINE_CRLF |
| 1251 |
<P> |
<P> |
| 1252 |
When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is set, and a |
When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is set, and a |
| 1253 |
match attempt for an unanchored pattern fails when the current position is at a |
match attempt for an unanchored pattern fails when the current position is at a |
| 1254 |
CRLF sequence, and the pattern contains no explicit matches for CR or NL |
CRLF sequence, and the pattern contains no explicit matches for CR or LF |
| 1255 |
characters, the match position is advanced by two characters instead of one, in |
characters, the match position is advanced by two characters instead of one, in |
| 1256 |
other words, to after the CRLF. |
other words, to after the CRLF. |
| 1257 |
</P> |
</P> |
| 1262 |
start, it skips both the CR and the LF before retrying. However, the pattern |
start, it skips both the CR and the LF before retrying. However, the pattern |
| 1263 |
[\r\n]A does match that string, because it contains an explicit CR or LF |
[\r\n]A does match that string, because it contains an explicit CR or LF |
| 1264 |
reference, and so advances only by one character after the first failure. |
reference, and so advances only by one character after the first failure. |
| 1265 |
Note than an explicit CR or LF reference occurs for negated character classes |
</P> |
| 1266 |
such as [^X] because they can match CR or LF characters. |
<P> |
| 1267 |
|
An explicit match for CR of LF is either a literal appearance of one of those |
| 1268 |
|
characters, or one of the \r or \n escape sequences. Implicit matches such as |
| 1269 |
|
[^X] do not count, nor does \s (which includes CR and LF in the characters |
| 1270 |
|
that it matches). |
| 1271 |
</P> |
</P> |
| 1272 |
<P> |
<P> |
| 1273 |
Notwithstanding the above, anomalous effects may still occur when CRLF is a |
Notwithstanding the above, anomalous effects may still occur when CRLF is a |
| 1948 |
</P> |
</P> |
| 1949 |
<br><a name="SEC22" href="#TOC1">REVISION</a><br> |
<br><a name="SEC22" href="#TOC1">REVISION</a><br> |
| 1950 |
<P> |
<P> |
| 1951 |
Last updated: 21 August 2007 |
Last updated: 11 September 2007 |
| 1952 |
<br> |
<br> |
| 1953 |
Copyright © 1997-2007 University of Cambridge. |
Copyright © 1997-2007 University of Cambridge. |
| 1954 |
<br> |
<br> |