diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2014-11-11 16:51:07 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2014-11-11 16:51:07 +0000 |
commit | 78bf9ce77125f21369990121ce4f8ee56b061654 (patch) | |
tree | 69f571c972630bb97763132e6a560161b4910990 /doc/html/pcre2test.html | |
parent | b0203c3ee3c9e3f9ad2ad26797c574ce2b264d22 (diff) | |
download | pcre2-78bf9ce77125f21369990121ce4f8ee56b061654.tar.gz |
Substitute code update and documentation.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@143 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'doc/html/pcre2test.html')
-rw-r--r-- | doc/html/pcre2test.html | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/doc/html/pcre2test.html b/doc/html/pcre2test.html index 527a609..0cae3b2 100644 --- a/doc/html/pcre2test.html +++ b/doc/html/pcre2test.html @@ -488,7 +488,6 @@ about the pattern: posix use the POSIX API stackguard=<number> test the stackguard feature tables=[0|1|2] select internal tables - use_length use the pattern's length </pre> The effects of these modifiers are described in the following sections. FIXME: Give more examples. @@ -542,15 +541,10 @@ pairs. For example: /ab 32 59/hex </pre> This feature is provided as a way of creating patterns that contain binary zero -characters. When <b>hex</b> is set, it implies <b>use_length</b>. -</P> -<br><b> -Using the pattern's length -</b><br> -<P> -By default, <b>pcre2test</b> passes patterns as zero-terminated strings to -<b>pcre2_compile()</b>, giving the length as -1. If <b>use_length</b> is set, the -length of the pattern is passed. This is implied if <b>hex</b> is set. +characters. By default, <b>pcre2test</b> passes patterns as zero-terminated +strings to <b>pcre2_compile()</b>, giving the length as PCRE2_ZERO_TERMINATED. +However, for patterns specified in hexadecimal, the length of the pattern is +passed. </P> <br><b> JIT compilation @@ -766,6 +760,7 @@ pattern. ovector=<n> set size of output vector recursion_limit=<n> set a recursion limit startchar show startchar when relevant + zero_terminate pass the subject as zero-terminated </pre> The effects of these modifiers are described in the following sections. FIXME: Give more examples. @@ -979,6 +974,20 @@ match block of exactly the right size for the pattern. (It is not possible to create a match block with a zero-length ovector; there is always one pair of offsets.) </P> +<br><b> +Passing the subject as zero-terminated +</b><br> +<P> +By default, the subject string is passed to a native API matching function with +its correct length. In order to test the facility for passing a zero-terminated +string, the <b>zero_terminate</b> modifier is provided. It causes the length to +be passed as PCRE2_ZERO_TERMINATED. (When matching via the POSIX interface, +this modifier has no effect, as there is no facility for passing a length.) +</P> +<P> +When testing <b>pcre2_substitute</b>, this modifier also has the effect of +passing the replacement string as zero-terminated. +</P> <br><a name="SEC12" href="#TOC1">THE ALTERNATIVE MATCHING FUNCTION</a><br> <P> By default, <b>pcre2test</b> uses the standard PCRE2 matching function, @@ -1224,7 +1233,7 @@ Cambridge CB2 3QH, England. </P> <br><a name="SEC20" href="#TOC1">REVISION</a><br> <P> -Last updated: 02 November 2014 +Last updated: 09 November 2014 <br> Copyright © 1997-2014 University of Cambridge. <br> |