diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2019-01-04 16:41:32 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2019-01-04 16:41:32 +0000 |
commit | 8a94e38ad010d2b6e0dd2a324572930f0aa453e8 (patch) | |
tree | 4307565922c0d73a681c2883274f069a6da84d00 /doc | |
parent | b0b9531ac4b12f4127f67d8ad050d8d527b67981 (diff) | |
download | pcre2-8a94e38ad010d2b6e0dd2a324572930f0aa453e8.tar.gz |
Fix issues with BAD_ESCAPE_IS_LITERAL in character classes.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1058 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc')
-rw-r--r-- | doc/html/pcre2api.html | 13 | ||||
-rw-r--r-- | doc/pcre2.txt | 12 | ||||
-rw-r--r-- | doc/pcre2api.3 | 15 |
3 files changed, 25 insertions, 15 deletions
diff --git a/doc/html/pcre2api.html b/doc/html/pcre2api.html index 9e02fda..018a077 100644 --- a/doc/html/pcre2api.html +++ b/doc/html/pcre2api.html @@ -1870,11 +1870,14 @@ always causes an error in Perl. </P> <P> If the PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL extra option is passed to -<b>pcre2_compile()</b>, all unrecognized or erroneous escape sequences are +<b>pcre2_compile()</b>, all unrecognized or malformed escape sequences are treated as single-character escapes. For example, \j is a literal "j" and \x{2z} is treated as the literal string "x{2z}". Setting this option means -that typos in patterns may go undetected and have unexpected results. This is a -dangerous option. Use with care. +that typos in patterns may go undetected and have unexpected results. Also note +that a sequence such as [\N{] is interpreted as a malformed attempt at +[\N{...}] and so is treated as [N{] whereas [\N] gives an error because an +unqualified \N is a valid escape sequence but is not supported in a character +class. To reiterate: this is a dangerous option. Use with great care. <pre> PCRE2_EXTRA_ESCAPED_CR_IS_LF </pre> @@ -3782,9 +3785,9 @@ Cambridge, England. </P> <br><a name="SEC42" href="#TOC1">REVISION</a><br> <P> -Last updated: 27 November 2018 +Last updated: 04 January 2019 <br> -Copyright © 1997-2018 University of Cambridge. +Copyright © 1997-2019 University of Cambridge. <br> <p> Return to the <a href="index.html">PCRE2 index page</a>. diff --git a/doc/pcre2.txt b/doc/pcre2.txt index fa5ef88..0a54e89 100644 --- a/doc/pcre2.txt +++ b/doc/pcre2.txt @@ -1846,11 +1846,15 @@ COMPILING A PATTERN Perl. If the PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL extra option is passed to - pcre2_compile(), all unrecognized or erroneous escape sequences are + pcre2_compile(), all unrecognized or malformed escape sequences are treated as single-character escapes. For example, \j is a literal "j" and \x{2z} is treated as the literal string "x{2z}". Setting this option means that typos in patterns may go undetected and have unex- - pected results. This is a dangerous option. Use with care. + pected results. Also note that a sequence such as [\N{] is interpreted + as a malformed attempt at [\N{...}] and so is treated as [N{] whereas + [\N] gives an error because an unqualified \N is a valid escape + sequence but is not supported in a character class. To reiterate: this + is a dangerous option. Use with great care. PCRE2_EXTRA_ESCAPED_CR_IS_LF @@ -3654,8 +3658,8 @@ AUTHOR REVISION - Last updated: 27 November 2018 - Copyright (c) 1997-2018 University of Cambridge. + Last updated: 04 January 2019 + Copyright (c) 1997-2019 University of Cambridge. ------------------------------------------------------------------------------ diff --git a/doc/pcre2api.3 b/doc/pcre2api.3 index 5d64bc9..f20de25 100644 --- a/doc/pcre2api.3 +++ b/doc/pcre2api.3 @@ -1,4 +1,4 @@ -.TH PCRE2API 3 "27 November 2018" "PCRE2 10.33" +.TH PCRE2API 3 "04 January 2019" "PCRE2 10.33" .SH NAME PCRE2 - Perl-compatible regular expressions (revised API) .sp @@ -1825,11 +1825,14 @@ Perl's warning switch is enabled. However, a malformed octal number after \eo{ always causes an error in Perl. .P If the PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL extra option is passed to -\fBpcre2_compile()\fP, all unrecognized or erroneous escape sequences are +\fBpcre2_compile()\fP, all unrecognized or malformed escape sequences are treated as single-character escapes. For example, \ej is a literal "j" and \ex{2z} is treated as the literal string "x{2z}". Setting this option means -that typos in patterns may go undetected and have unexpected results. This is a -dangerous option. Use with care. +that typos in patterns may go undetected and have unexpected results. Also note +that a sequence such as [\eN{] is interpreted as a malformed attempt at +[\eN{...}] and so is treated as [N{] whereas [\eN] gives an error because an +unqualified \eN is a valid escape sequence but is not supported in a character +class. To reiterate: this is a dangerous option. Use with great care. .sp PCRE2_EXTRA_ESCAPED_CR_IS_LF .sp @@ -3790,6 +3793,6 @@ Cambridge, England. .rs .sp .nf -Last updated: 27 November 2018 -Copyright (c) 1997-2018 University of Cambridge. +Last updated: 04 January 2019 +Copyright (c) 1997-2019 University of Cambridge. .fi |