diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2018-09-21 16:59:48 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2018-09-21 16:59:48 +0000 |
commit | 78ec284cdef4eefe5e551ca90f444833130ed834 (patch) | |
tree | 18b065ecb081f20467925ee049346a5873114633 /doc/html | |
parent | dd9e5dc97b897fdec64525560131c1ffb8d8a4d4 (diff) | |
download | pcre2-78ec284cdef4eefe5e551ca90f444833130ed834.tar.gz |
Implement PCRE2_EXTRA_ESCAPED_CR_IS_LF
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1017 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc/html')
-rw-r--r-- | doc/html/pcre2_set_compile_extra_options.html | 1 | ||||
-rw-r--r-- | doc/html/pcre2api.html | 10 | ||||
-rw-r--r-- | doc/html/pcre2pattern.html | 10 | ||||
-rw-r--r-- | doc/html/pcre2test.html | 3 |
4 files changed, 20 insertions, 4 deletions
diff --git a/doc/html/pcre2_set_compile_extra_options.html b/doc/html/pcre2_set_compile_extra_options.html index 7374931..336852a 100644 --- a/doc/html/pcre2_set_compile_extra_options.html +++ b/doc/html/pcre2_set_compile_extra_options.html @@ -32,6 +32,7 @@ options are: <pre> PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES Allow \x{df800} to \x{dfff} in UTF-8 and UTF-32 modes PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL Treat all invalid escapes as a literal following character + PCRE2_EXTRA_ESCAPED_CR_IS_LF Interpret \r as \n PCRE2_EXTRA_MATCH_LINE Pattern matches whole lines PCRE2_EXTRA_MATCH_WORD Pattern matches "words" </pre> diff --git a/doc/html/pcre2api.html b/doc/html/pcre2api.html index c2efca1..f843e97 100644 --- a/doc/html/pcre2api.html +++ b/doc/html/pcre2api.html @@ -1873,6 +1873,14 @@ treated as single-character escapes. For example, \j is a literal "j" and that typos in patterns may go undetected and have unexpected results. This is a dangerous option. Use with care. <pre> + PCRE2_EXTRA_ESCAPED_CR_IS_LF +</pre> +There are some legacy applications where the escape sequence \r in a pattern +is expected to match a newline. If this option is set, \r in a pattern is +converted to \n so that it matches a LF (linefeed) instead of a CR (carriage +return) character. The option does not affect a literal CR in the pattern, nor +does it affect CR specified as an explicit code point such as \x{0D}. +<pre> PCRE2_EXTRA_MATCH_LINE </pre> This option is provided for use by the <b>-x</b> option of <b>pcre2grep</b>. It @@ -3724,7 +3732,7 @@ Cambridge, England. </P> <br><a name="SEC42" href="#TOC1">REVISION</a><br> <P> -Last updated: 18 September 2018 +Last updated: 21 September 2018 <br> Copyright © 1997-2018 University of Cambridge. <br> diff --git a/doc/html/pcre2pattern.html b/doc/html/pcre2pattern.html index e43e98e..8a2ef4e 100644 --- a/doc/html/pcre2pattern.html +++ b/doc/html/pcre2pattern.html @@ -393,7 +393,7 @@ these escapes are as follows: \e escape (hex 1B) \f form feed (hex 0C) \n linefeed (hex 0A) - \r carriage return (hex 0D) + \r carriage return (hex 0D) (but see below) \t tab (hex 09) \0dd character with octal code 0dd \ddd character with octal code ddd, or backreference @@ -403,6 +403,12 @@ these escapes are as follows: \N{U+hhh..} character with Unicode hex code point hhh.. \uhhhh character with hex code hhhh (when PCRE2_ALT_BSUX is set) </pre> +There are some legacy applications where the escape sequence \r is expected to +match a newline. If the PCRE2_EXTRA_ESCAPED_CR_IS_LF option is set, \r in a +pattern is converted to \n so that it matches a LF (linefeed) instead of a CR +(carriage return) character. +</P> +<P> The \N{U+hhh..} escape sequence is recognized only when the PCRE2_UTF option is set, that is, when PCRE2 is operating in a Unicode mode. Perl also uses \N{name} to specify characters by Unicode name; PCRE2 does not support this. @@ -3624,7 +3630,7 @@ Cambridge, England. </P> <br><a name="SEC30" href="#TOC1">REVISION</a><br> <P> -Last updated: 04 September 2018 +Last updated: 21 September 2018 <br> Copyright © 1997-2018 University of Cambridge. <br> diff --git a/doc/html/pcre2test.html b/doc/html/pcre2test.html index ebff2c2..f5ce072 100644 --- a/doc/html/pcre2test.html +++ b/doc/html/pcre2test.html @@ -606,6 +606,7 @@ for a description of the effects of these options. /s dotall set PCRE2_DOTALL dupnames set PCRE2_DUPNAMES endanchored set PCRE2_ENDANCHORED + escaped_cr_is_lf set PCRE2_EXTRA_ESCAPED_CR_IS_LF /x extended set PCRE2_EXTENDED /xx extended_more set PCRE2_EXTENDED_MORE firstline set PCRE2_FIRSTLINE @@ -2039,7 +2040,7 @@ Cambridge, England. </P> <br><a name="SEC21" href="#TOC1">REVISION</a><br> <P> -Last updated: 17 September 2018 +Last updated: 21 September 2018 <br> Copyright © 1997-2018 University of Cambridge. <br> |