doc: say that PCRE2_DFA_RESTART does not remove the need to retain data - #947
Merged
NWilson merged 2 commits intoAug 16, 2026
Merged
Conversation
Member
|
Thank you very much! I have made a couple of minor corrections, but your text is helpful. |
The multi-segment section explains the 1234|3789 limitation but leaves the impression that restarting frees the caller from keeping earlier text. A lookbehind still reaches back into it, and the bound is the same PCRE2_INFO_MAXLOOKBEHIND that the pcre2_match() section already describes. Wording follows what was concluded in PCRE2Project#867.
karpovantonme
force-pushed
the
doc/dfa-restart-retain-data
branch
from
August 16, 2026 15:07
5a07da3 to
a77890d
Compare
Contributor
Author
|
Thanks for taking it and for the corrections 🙏🏼 rebased onto main, your commit kept as is. the red Bazel job on windows was a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #867
the multi-segment section for
pcre2_dfa_match()explains the1234|3789limitation, but it still reads as if restarting frees the caller from keeping earlier text. It does not: a lookbehind reaches back into the segment that was discarded, and the bound on how much to keep is the samePCRE2_INFO_MAXLOOKBEHINDthat thepcre2_match()section above already describesso the added paragraph says that, and points at retaining a bounded tail and running a fresh match as the approach that achieves the same results as searching the whole subject at once. Nothing new is claimed here, the wording follows what was concluded in #867
two files:
doc/pcre2partial.3, and the generateddoc/html/pcre2partial.htmlregenerated withmaint/132htmlthe waymaint/UpdateAlwayscalls it.maint/CheckManis clean on the pageif you would rather deprecate
PCRE2_DFA_RESTARToutright, say so and I will close this