From 000f53cf12bbfb4f658d2417a96e03cb3c0b97cc Mon Sep 17 00:00:00 2001
From: ph10
@@ -110,7 +110,7 @@ inspected while carrying out the match. For example, consider this pattern: This pattern matches "123", but only if it is preceded by "abc". If the subject string is "xyzabc12", the first two offsets after a partial match are for the substring "abc12", because all these characters were inspected. However, the -third offset is set to 6, because that is the offset where matching began. +third offset is set to 6, because that is the offset where matching began.
What happens when a partial match is identified depends on which of the two @@ -337,8 +337,8 @@ processing time is needed.
Note: If the pattern contains lookbehind assertions, or \K, or starts with \b or \B, the string that is returned for a partial match includes -characters that precede the start of what would be returned for a complete -match, because it contains all the characters that were inspected during the +characters that precede the start of what would be returned for a complete +match, because it contains all the characters that were inspected during the partial match.
@@ -380,7 +380,7 @@ and 5. This indicates that the matching process that gave a partial match started at offset 5, but the characters "123a" were all inspected. The maximum lookbehind for that pattern is 3, so taking that away from 5 shows that we need only keep "123a", and the next match attempt can be started at offset 3 (that -is, at "a") when further characters have been added. When the match start is +is, at "a") when further characters have been added. When the match start is not the earliest inspected character, pcretest shows it explicitly:
re> "(?<=123)abc" -- cgit v1.2.1