Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex matching groups escaped as regular characters #30

Open
kjduensing opened this issue May 1, 2023 · 0 comments
Open

Regex matching groups escaped as regular characters #30

kjduensing opened this issue May 1, 2023 · 0 comments

Comments

@kjduensing
Copy link

kjduensing commented May 1, 2023

I was trying to add a negative lookahead regular expression w/in an endpoint path, and noticed that my matching group was being escaped, causing no endpoint match to be found.

What I was going for:
/letters\/(?![^\/]*(letterBeneficiary))[^\/]*\/generate

What I got:
\/letters\/\(?![^\/]*\(letterBeneficiary\)\)[^\/]*\/generate

The negative lookahead expression contains parentheses, and it looks like this commit removed the ability to include regular expressions like this. I know that commit was intended to support endpoints with the literal characters: ( and ), but I wonder if there's some middle ground we can reach to support both a more general use case and the use case enabled by the previous commit.

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

No branches or pull requests

1 participant