KEMBAR78
`<regex>`: Do not reset matched capture groups in POSIX regexes by muellerj2 · Pull Request #5377 · microsoft/STL · GitHub
Skip to content

Conversation

@muellerj2
Copy link
Contributor

Towards #5365. Fixes the behavior for POSIX regexes: Section 9.3.6 says that backreferences always refer to the last matched string if a capture group/subexpression has been matched more than once, so captures should not be cleared during matching at all.

@muellerj2 muellerj2 requested a review from a team as a code owner March 28, 2025 19:36
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Mar 28, 2025
@StephanTLavavej StephanTLavavej added bug Something isn't working regex meow is a substring of homeowner labels Mar 29, 2025
@StephanTLavavej StephanTLavavej self-assigned this Mar 29, 2025
@StephanTLavavej
Copy link
Member

Thanks! 😻 I added some test coverage, and I'm finally starting to understand how nested capture groups work 💡

@StephanTLavavej StephanTLavavej removed their assignment Apr 3, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 3, 2025
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Apr 9, 2025
@StephanTLavavej StephanTLavavej self-assigned this Apr 9, 2025
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Copy link
Member

Resolved adjacent-add conflicts in VSO_0000000_regex_use.

@StephanTLavavej StephanTLavavej merged commit 6acd990 into microsoft:main Apr 10, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Merging to Done in STL Code Reviews Apr 10, 2025
@StephanTLavavej
Copy link
Member

🐱 😸 😻

@muellerj2 muellerj2 deleted the regex-do-not-reset-capture-groups-for-posix-regexes branch April 13, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working regex meow is a substring of homeowner

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants