Skip to content

doc: say that PCRE2_DFA_RESTART does not remove the need to retain data - #947

Merged
NWilson merged 2 commits into
PCRE2Project:mainfrom
karpovantonme:doc/dfa-restart-retain-data
Aug 16, 2026
Merged

doc: say that PCRE2_DFA_RESTART does not remove the need to retain data#947
NWilson merged 2 commits into
PCRE2Project:mainfrom
karpovantonme:doc/dfa-restart-retain-data

Conversation

@karpovantonme

@karpovantonme karpovantonme commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #867

the multi-segment section for pcre2_dfa_match() explains the 1234|3789 limitation, 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 same PCRE2_INFO_MAXLOOKBEHIND that the pcre2_match() section above already describes

so 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 generated doc/html/pcre2partial.html regenerated with maint/132html the way maint/UpdateAlways calls it. maint/CheckMan is clean on the page

if you would rather deprecate PCRE2_DFA_RESTART outright, say so and I will close this

@NWilson NWilson added this to the 10.48 milestone Aug 12, 2026
@NWilson

NWilson commented Aug 12, 2026

Copy link
Copy Markdown
Member

Thank you very much! I have made a couple of minor corrections, but your text is helpful.

karpovantonme and others added 2 commits August 16, 2026 18:06
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
karpovantonme force-pushed the doc/dfa-restart-retain-data branch from 5a07da3 to a77890d Compare August 16, 2026 15:07
@karpovantonme

Copy link
Copy Markdown
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 503 Service Unavailable fetching bazel-skylib-1.8.2.tar.gz rather than anything in the diff, so the fresh run should be clean once it gets an approval to start

@NWilson
NWilson merged commit 32de549 into PCRE2Project:main Aug 16, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants