Skip to content

Conversation

@NWilson
Copy link
Member

@NWilson NWilson commented Dec 2, 2025

Fixes #846

@rrthomas
Copy link

rrthomas commented Dec 8, 2025

Thanks very much for this. It looks good on a read-through. The restrictions make sense. (I guess it would be possible if desired to reroute the match & substitution through code that works on the entire input if I wanted to support the use of $_ and $', having detected that condition with the ERROR_PARTIALSUBS error.)

I'll see if I can build my code against this branch now.

@rrthomas
Copy link

rrthomas commented Dec 8, 2025

The only thing I would question so far is the wording: relative to the current state, it's correct to say "Add support for partial matching", but relative to the status quo ante 10.47, it's more "Restore support for partial matching, now properly documented and implemented": after all, it worked fine before, though certain uses would have silently failed.

And I don't suppose I was the only person previously relying on this behavior!

@rrthomas
Copy link

rrthomas commented Dec 8, 2025

Yup, works fine for me. A thousand thanks!

@NWilson
Copy link
Member Author

NWilson commented Dec 8, 2025

Thank you for those comments, and confirming that it works.

Also, I do acknowledge that I did break your flow in 10.47, which had been previously working. I apologise again. (It's possible however that no-one else had discovered this flow, due to the fact that it required PCRE2_SUBSTITUTE_MATCHED to allow partial matching.)

@rrthomas
Copy link

rrthomas commented Dec 8, 2025

It's less that I feel ignored (I don't!) and more that it might surprise future pedantic readers of the changelog (like me!) who end up confused and side-tracked by the idea that this functionality is brand new in 10.48.

I put "future me" firmly in this class of people, BTW, once I've forgotten this whole issue about 5 minutes after it gets fixed.

@NWilson NWilson merged commit a8ab3be into main Dec 8, 2025
21 checks passed
@NWilson NWilson deleted the user/niwilson/subs-partial branch December 8, 2025 16:43
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.

Can't use PARTIAL_HARD matches with SUBSITUTE_MATCHED

4 participants