summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-10-08 15:06:46 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-10-08 15:06:46 +0000
commite53ac621ef11427dd1c9fd6def13349cc196fd8c (patch)
treeff26bfb4308c63ef4d02d4c25cfee2c55b25529f /doc
parent0277649fafae94e180c599aeb3592b77627d35b4 (diff)
downloadpcre-e53ac621ef11427dd1c9fd6def13349cc196fd8c.tar.gz
Update \8 and \9 handling to match most recent Perl.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1369 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'doc')
-rw-r--r--doc/pcrepattern.328
-rw-r--r--doc/pcresyntax.37
2 files changed, 20 insertions, 15 deletions
diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3
index 3c3980d..de9aa10 100644
--- a/doc/pcrepattern.3
+++ b/doc/pcrepattern.3
@@ -1,4 +1,4 @@
-.TH PCREPATTERN 3 "05 October 2013" "PCRE 8.34"
+.TH PCREPATTERN 3 "08 October 2013" "PCRE 8.34"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE REGULAR EXPRESSION DETAILS"
@@ -359,9 +359,10 @@ specifies two binary zeros followed by a BEL character (code value 7). Make
sure you supply two digits after the initial zero if the pattern character that
follows is itself an octal digit.
.P
-The handling of a backslash followed by a digit other than 0 is complicated.
-Outside a character class, PCRE reads it and any following digits as a decimal
-number. If the number is less than 10, or if there have been at least that many
+The handling of a backslash followed by a digit other than 0 is complicated,
+and Perl has changed in recent releases, causing PCRE also to change. Outside a
+character class, PCRE reads the digit and any following digits as a decimal
+number. If the number is less than 8, or if there have been at least that many
previous capturing left parentheses in the expression, the entire sequence is
taken as a \fIback reference\fP. A description of how this works is given
.\" HTML <a href="#backreferences">
@@ -374,12 +375,13 @@ following the discussion of
parenthesized subpatterns.
.\"
.P
-Inside a character class, or if the decimal number is greater than 9 and there
-have not been that many capturing subpatterns, PCRE re-reads up to three octal
-digits following the backslash, and uses them to generate a data character. Any
-subsequent digits stand for themselves. The value of the character is
-constrained in the same way as characters specified in hexadecimal.
-For example:
+Inside a character class, or if the decimal number following \e is greater than
+7 and there have not been that many capturing subpatterns, PCRE handles \e8 and
+\e9 as the literal characters "8" and "9", and otherwise re-reads up to three
+octal digits following the backslash, using them to generate a data character.
+Any subsequent digits stand for themselves. The value of the character is
+constrained in the same way as characters specified in hexadecimal. For
+example:
.sp
\e040 is another way of writing an ASCII space
.\" JOIN
@@ -398,8 +400,8 @@ For example:
\e377 might be a back reference, otherwise
the value 255 (decimal)
.\" JOIN
- \e81 is either a back reference, or a binary zero
- followed by the two characters "8" and "1"
+ \e81 is either a back reference, or the two
+ characters "8" and "1"
.sp
Note that octal values of 100 or greater must not be introduced by a leading
zero, because no more than three octal digits are ever read.
@@ -3156,6 +3158,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 05 October 2013
+Last updated: 08 October 2013
Copyright (c) 1997-2013 University of Cambridge.
.fi
diff --git a/doc/pcresyntax.3 b/doc/pcresyntax.3
index 17d9d51..da1c3b9 100644
--- a/doc/pcresyntax.3
+++ b/doc/pcresyntax.3
@@ -1,4 +1,4 @@
-.TH PCRESYNTAX 3 "05 October 2013" "PCRE 8.34"
+.TH PCRESYNTAX 3 "08 October 2013" "PCRE 8.34"
.SH NAME
PCRE - Perl-compatible regular expressions
.SH "PCRE REGULAR EXPRESSION SYNTAX SUMMARY"
@@ -32,6 +32,9 @@ documentation. This document contains a quick-reference summary of the syntax.
\eddd character with octal code ddd, or backreference
\exhh character with hex code hh
\ex{hhh..} character with hex code hhh..
+.sp
+Note that \e0dd is always an octal code, and that \e8 and \e9 are the literal
+characters "8" and "9".
.
.
.SH "CHARACTER TYPES"
@@ -498,6 +501,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
-Last updated: 05 October 2013
+Last updated: 08 October 2013
Copyright (c) 1997-2013 University of Cambridge.
.fi