From 29d1e2521ac05f63981a6d956ac3a6d49407fde6 Mon Sep 17 00:00:00 2001 From: ph10 Date: Wed, 26 Jun 2019 08:23:47 +0000 Subject: Make pcre2test show actual pre-match consulted characters for a partial match, not the length of the longest lookbehind. Control this by "allusedtext". git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1122 6239d852-aaf2-0410-a92c-79f79f948069 --- doc/html/pcre2test.html | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'doc/html/pcre2test.html') diff --git a/doc/html/pcre2test.html b/doc/html/pcre2test.html index 0adae4c..5cf16d5 100644 --- a/doc/html/pcre2test.html +++ b/doc/html/pcre2test.html @@ -1252,22 +1252,27 @@ following line with a plus character following the capture number.

The allusedtext modifier requests that all the text that was consulted -during a successful pattern match by the interpreter should be shown. This -feature is not supported for JIT matching, and if requested with JIT it is -ignored (with a warning message). Setting this modifier affects the output if -there is a lookbehind at the start of a match, or a lookahead at the end, or if -\K is used in the pattern. Characters that precede or follow the start and end -of the actual match are indicated in the output by '<' or '>' characters -underneath them. Here is an example: +during a successful pattern match by the interpreter should be shown, for both +full and partial matches. This feature is not supported for JIT matching, and +if requested with JIT it is ignored (with a warning message). Setting this +modifier affects the output if there is a lookbehind at the start of a match, +or, for a complete match, a lookahead at the end, or if \K is used in the +pattern. Characters that precede or follow the start and end of the actual +match are indicated in the output by '<' or '>' characters underneath them. +Here is an example:

     re> /(?<=pqr)abc(?=xyz)/
   data> 123pqrabcxyz456\=allusedtext
    0: pqrabcxyz
       <<<   >>>
+  data> 123pqrabcxy\=ph,allusedtext
+  Partial match: pqrabcxy
+                 <<<
 
-This shows that the matched string is "abc", with the preceding and following -strings "pqr" and "xyz" having been consulted during the match (when processing -the assertions). +The first, complete match shows that the matched string is "abc", with the +preceding and following strings "pqr" and "xyz" having been consulted during +the match (when processing the assertions). The partial match can indicate only +the preceding string.

The startchar modifier requests that the starting character for the match @@ -2081,7 +2086,7 @@ Cambridge, England.


REVISION

-Last updated: 20 June 2019 +Last updated: 26 June 2019
Copyright © 1997-2019 University of Cambridge.
-- cgit v1.2.1