| 89 |
.\" </a> |
.\" </a> |
| 90 |
"Newline sequences" |
"Newline sequences" |
| 91 |
.\" |
.\" |
| 92 |
below. |
below. A change of \eR setting can be combined with a change of newline |
| 93 |
|
convention. |
| 94 |
. |
. |
| 95 |
. |
. |
| 96 |
.SH "CHARACTERS AND METACHARACTERS" |
.SH "CHARACTERS AND METACHARACTERS" |
| 427 |
.P |
.P |
| 428 |
It is possible to restrict \eR to match only CR, LF, or CRLF (instead of the |
It is possible to restrict \eR to match only CR, LF, or CRLF (instead of the |
| 429 |
complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF |
complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF |
| 430 |
either at compile time or when the pattern is matched. This can be made the |
either at compile time or when the pattern is matched. (BSR is an abbrevation |
| 431 |
default when PCRE is built; if this is the case, the other behaviour can be |
for "backslash R".) This can be made the default when PCRE is built; if this is |
| 432 |
requested via the PCRE_BSR_UNICODE option. It is also possible to specify these |
the case, the other behaviour can be requested via the PCRE_BSR_UNICODE option. |
| 433 |
settings by starting a pattern string with one of the following sequences: |
It is also possible to specify these settings by starting a pattern string with |
| 434 |
|
one of the following sequences: |
| 435 |
.sp |
.sp |
| 436 |
(*BSR_ANYCRLF) CR, LF, or CRLF only |
(*BSR_ANYCRLF) CR, LF, or CRLF only |
| 437 |
(*BSR_UNICODE) any Unicode newline sequence |
(*BSR_UNICODE) any Unicode newline sequence |
| 440 |
they can be overridden by options given to \fBpcre_exec()\fP. Note that these |
they can be overridden by options given to \fBpcre_exec()\fP. Note that these |
| 441 |
special settings, which are not Perl-compatible, are recognized only at the |
special settings, which are not Perl-compatible, are recognized only at the |
| 442 |
very start of a pattern, and that they must be in upper case. If more than one |
very start of a pattern, and that they must be in upper case. If more than one |
| 443 |
of them is present, the last one is used. |
of them is present, the last one is used. They can be combined with a change of |
| 444 |
.P |
newline convention, for example, a pattern can start with: |
| 445 |
|
.sp |
| 446 |
|
(*ANY)(*BSR_ANYCRLF) |
| 447 |
|
.sp |
| 448 |
Inside a character class, \eR matches the letter "R". |
Inside a character class, \eR matches the letter "R". |
| 449 |
. |
. |
| 450 |
. |
. |
| 2182 |
.rs |
.rs |
| 2183 |
.sp |
.sp |
| 2184 |
.nf |
.nf |
| 2185 |
Last updated: 11 September 2007 |
Last updated: 14 September 2007 |
| 2186 |
Copyright (c) 1997-2007 University of Cambridge. |
Copyright (c) 1997-2007 University of Cambridge. |
| 2187 |
.fi |
.fi |