Skip to content

ref(grouping): Remove lookahead and lookbehind from parameterization regex class#112274

Merged
lobsterkatie merged 3 commits into
masterfrom
kmclb-remove-lookahead-and-lookbehind-from-parameterization-regex-class
Apr 6, 2026
Merged

ref(grouping): Remove lookahead and lookbehind from parameterization regex class#112274
lobsterkatie merged 3 commits into
masterfrom
kmclb-remove-lookahead-and-lookbehind-from-parameterization-regex-class

Conversation

@lobsterkatie
Copy link
Copy Markdown
Member

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.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 6, 2026
@lobsterkatie lobsterkatie marked this pull request as ready for review April 6, 2026 19:38
@lobsterkatie lobsterkatie requested a review from a team as a code owner April 6, 2026 19:38
@lobsterkatie lobsterkatie merged commit a7ab73e into master Apr 6, 2026
107 checks passed
@lobsterkatie lobsterkatie deleted the kmclb-remove-lookahead-and-lookbehind-from-parameterization-regex-class branch April 6, 2026 20:04
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.
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants