KEMBAR78
`<regex>`: Permit escaping of closing brackets in POSIX regexes by muellerj2 · Pull Request #5399 · microsoft/STL · GitHub
Skip to content

Conversation

@muellerj2
Copy link
Contributor

Short follow-up to #5380 to support escapes for closing brackets in POSIX regexes in accordance with the most recent POSIX standard version: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html#tag_09_03_02 for basic and https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html#tag_09_04_02 for extended regexes.

Because of the (expected) test failures caused by this change, I noticed that the tests in gh_5244_atomescape_posix_common are called twice for extended and egrep from test_gh_5244_atomescape_extended_or_egrep: Once via gh_5244_atomescape_posix_not_awk and once via gh_5244_atomescape_extended_egrep_awk. That's once more than necessary, so let's get rid of this double-testing. I opted to remove the call of gh_5244_atomescape_posix_common in gh_5244_atomescape_extended_egrep_awk, but this means a call has to be added to gh_5244_atomescape_awk so that these common POSIX tests are still exercised in awk mode.

@muellerj2 muellerj2 requested a review from a team as a code owner April 10, 2025 19:50
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Apr 10, 2025
@StephanTLavavej StephanTLavavej self-assigned this Apr 10, 2025
@StephanTLavavej StephanTLavavej added enhancement Something can be improved regex meow is a substring of homeowner labels Apr 10, 2025
@StephanTLavavej StephanTLavavej removed their assignment Apr 11, 2025
@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in STL Code Reviews Apr 11, 2025
@StephanTLavavej StephanTLavavej moved this from Ready To Merge to Merging in STL Code Reviews Apr 22, 2025
@StephanTLavavej
Copy link
Member

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

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

Thanks for bringing us into the future of POSIX! 🛸 🚀 🪐

@muellerj2 muellerj2 deleted the regex-permit-escaping-of-right-brackets-in-posix-regexes branch May 31, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved regex meow is a substring of homeowner

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants