ref(grouping): Remove lookahead and lookbehind from parameterization regex class#112274
Merged
lobsterkatie merged 3 commits intoApr 6, 2026
Conversation
shashjar
approved these changes
Apr 6, 2026
george-sentry
pushed a commit
that referenced
this pull request
Apr 9, 2026
…regex class (#112274) In a number of our parameterization regex patterns, we use lookaheads and lookbehinds to control when the pattern applies. There's theoretically a mechanism built into the `ParameterizationRegex` class for that: `lookahead` and `lookbehind` values can be set when defining the regex, and they'll automatically be included in the final pattern string. Most of our regexes which use lookaheads and lookbehinds don't use it, though, opting instead to include the lookahead or lookbehind directly in the pattern. Not only is this more explicit, it also accommodates patterns which need negative rather than positive lookaheads/lookbehinds, and patterns which need multiple lookaheads/lookbehinds. This PR therefore switches the only two regexes using the attributes to also use explicit lookbehinds instead, and then deletes the now-unused attributes. No behavior changes here - just an attempt to make the code a touch simpler and more consistent.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
In a number of our parameterization regex patterns, we use lookaheads and lookbehinds to control when the pattern applies. There's theoretically a mechanism built into the
ParameterizationRegexclass for that:lookaheadandlookbehindvalues can be set when defining the regex, and they'll automatically be included in the final pattern string. Most of our regexes which use lookaheads and lookbehinds don't use it, though, opting instead to include the lookahead or lookbehind directly in the pattern. Not only is this more explicit, it also accommodates patterns which need negative rather than positive lookaheads/lookbehinds, and patterns which need multiple lookaheads/lookbehinds.This PR therefore switches the only two regexes using the attributes to also use explicit lookbehinds instead, and then deletes the now-unused attributes. No behavior changes here - just an attempt to make the code a touch simpler and more consistent.