summaryrefslogtreecommitdiff
path: root/doc/pcre2.txt
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-06-01 18:10:15 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2017-06-01 18:10:15 +0000
commit0b413ddb2bbcf992322ac8168bc1c180b5e0b096 (patch)
treefa3f434f0cd8a77ca19bf8b269544380abb4ca88 /doc/pcre2.txt
parentd7dc5d608f73e8fe3e6463806604fb29ce06fb3d (diff)
downloadpcre2-0b413ddb2bbcf992322ac8168bc1c180b5e0b096.tar.gz
Implement PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@816 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc/pcre2.txt')
-rw-r--r--doc/pcre2.txt20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/pcre2.txt b/doc/pcre2.txt
index 477ad6f..4341a61 100644
--- a/doc/pcre2.txt
+++ b/doc/pcre2.txt
@@ -1688,6 +1688,24 @@ COMPILING A PATTERN
only match subject characters if the matching function is called with
PCRE2_NO_UTF_CHECK set.
+ PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL
+
+ This is a dangerous option. Use with care. By default, an unrecognized
+ escape such as \j or a malformed one such as \x{2z} causes a compile-
+ time error when detected by pcre2_compile(). Perl is somewhat inconsis-
+ tent in handling such items: for example, \j is treated as a literal
+ "j", and non-hexadecimal digits in \x{} are just ignored, though warn-
+ ings are given in both cases if Perl's warning switch is enabled. How-
+ ever, a malformed octal number after \o{ always causes an error in
+ Perl.
+
+ If the PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL extra option is passed to
+ pcre2_compile(), all unrecognized or erroneous 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.
+
COMPILATION ERROR CODES
@@ -3350,7 +3368,7 @@ AUTHOR
REVISION
- Last updated: 30 May 2017
+ Last updated: 01 June 2017
Copyright (c) 1997-2017 University of Cambridge.
------------------------------------------------------------------------------