summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-05-03 11:13:37 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2010-05-03 11:13:37 +0000
commit7bd79d3485d19f91b25321744d6c378e25e37228 (patch)
tree19ba809b7c3b24a900491fc37255c1842d9055b4 /doc
parentf519d354b9128f7f7928c0b3143519b230a45703 (diff)
downloadpcre-7bd79d3485d19f91b25321744d6c378e25e37228.tar.gz
Make \R and \X in a character class behave more like Perl
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@513 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'doc')
-rw-r--r--doc/pcreapi.37
-rw-r--r--doc/pcrepattern.322
2 files changed, 18 insertions, 11 deletions
diff --git a/doc/pcreapi.3 b/doc/pcreapi.3
index 8fb0811..90c28ac 100644
--- a/doc/pcreapi.3
+++ b/doc/pcreapi.3
@@ -553,8 +553,9 @@ set, any backslash in a pattern that is followed by a letter that has no
special meaning causes an error, thus reserving these combinations for future
expansion. By default, as in Perl, a backslash followed by a letter with no
special meaning is treated as a literal. (Perl can, however, be persuaded to
-give a warning for this.) There are at present no other features controlled by
-this option. It can also be set by a (?X) option setting within a pattern.
+give an error for this, by running it with the -w option.) There are at present
+no other features controlled by this option. It can also be set by a (?X)
+option setting within a pattern.
.sp
PCRE_FIRSTLINE
.sp
@@ -2099,6 +2100,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 26 March 2010
+Last updated: 03 May 2010
Copyright (c) 1997-2010 University of Cambridge.
.fi
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
index c8822a1..36cc5ae 100644
--- a/doc/pcrepattern.3
+++ b/doc/pcrepattern.3
@@ -295,10 +295,11 @@ zero, because no more than three octal digits are ever read.
.P
All the sequences that define a single character value can be used both inside
and outside character classes. In addition, inside a character class, the
-sequence \eb is interpreted as the backspace character (hex 08), and the
-sequences \eR and \eX are interpreted as the characters "R" and "X",
-respectively. Outside a character class, these sequences have different
-meanings
+sequence \eb is interpreted as the backspace character (hex 08). The sequences
+\eB, \eR, and \eX are not special inside a character class. Like any other
+unrecognized escape sequences, they are treated as the literal characters "B",
+"R", and "X" by default, but cause an error if the PCRE_EXTRA option is set.
+Outside a character class, these sequences have different meanings
.\" HTML <a href="#uniextseq">
.\" </a>
(see below).
@@ -478,7 +479,9 @@ convention, for example, a pattern can start with:
.sp
(*ANY)(*BSR_ANYCRLF)
.sp
-Inside a character class, \eR matches the letter "R".
+Inside a character class, \eR is treated as an unrecognized escape sequence,
+and so matches the letter "R" by default, but causes an error if PCRE_EXTRA is
+set.
.
.
.\" HTML <a name="uniextseq"></a>
@@ -765,8 +768,11 @@ The backslashed assertions are:
\ez matches only at the end of the subject
\eG matches at the first matching position in the subject
.sp
-These assertions may not appear in character classes (but note that \eb has a
-different meaning, namely the backspace character, inside a character class).
+Inside a character class, \eb has a different meaning; it matches the backspace
+character. If any other of these assertions appears in a character class, by
+default it matches the corresponding literal character (for example, \eB
+matches the letter B). However, if the PCRE_EXTRA option is set, an "invalid
+escape sequence" error is generated instead.
.P
A word boundary is a position in the subject string where the current character
and the previous character do not both match \ew or \eW (i.e. one matches
@@ -2580,6 +2586,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 27 March 2010
+Last updated: 03 May 2010
Copyright (c) 1997-2010 University of Cambridge.
.fi