1218 |
.P |
.P |
1219 |
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 |
1220 |
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 |
1221 |
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 |
1222 |
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 |
1223 |
other words, to after the CRLF. |
other words, to after the CRLF. |
1224 |
.P |
.P |
1228 |
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 |
1229 |
[\er\en]A does match that string, because it contains an explicit CR or LF |
[\er\en]A does match that string, because it contains an explicit CR or LF |
1230 |
reference, and so advances only by one character after the first failure. |
reference, and so advances only by one character after the first failure. |
1231 |
Note than an explicit CR or LF reference occurs for negated character classes |
.P |
1232 |
such as [^X] because they can match CR or LF characters. |
An explicit match for CR of LF is either a literal appearance of one of those |
1233 |
|
characters, or one of the \er or \en escape sequences. Implicit matches such as |
1234 |
|
[^X] do not count, nor does \es (which includes CR and LF in the characters |
1235 |
|
that it matches). |
1236 |
.P |
.P |
1237 |
Notwithstanding the above, anomalous effects may still occur when CRLF is a |
Notwithstanding the above, anomalous effects may still occur when CRLF is a |
1238 |
valid newline sequence and explicit \er or \en escapes appear in the pattern. |
valid newline sequence and explicit \er or \en escapes appear in the pattern. |
1924 |
.rs |
.rs |
1925 |
.sp |
.sp |
1926 |
.nf |
.nf |
1927 |
Last updated: 21 August 2007 |
Last updated: 10 September 2007 |
1928 |
Copyright (c) 1997-2007 University of Cambridge. |
Copyright (c) 1997-2007 University of Cambridge. |
1929 |
.fi |
.fi |