-
Notifications
You must be signed in to change notification settings - Fork 141
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 tokens not working #204
Comments
I don't know, this would probably be investigated. Maybe it's an escaping issue? Or we should pass some custom option when we create the Regexp? |
I wanted to know if a known flaw. I'll dig it. |
The capture group for both includes |
I'm not sure this is the case. As this test for example won't pass either: find-my-way/test/regex.test.js Lines 37 to 50 in 70844a9
|
It’s still looking for the start of line. What do you think the caret is suppose to be doing here? |
In this context findMyWay.on('GET', '/test/:id(^\\d+$)/hello', () => {
t.ok('regex match')
})
findMyWay.lookup({ method: 'GET', url: '/test/12/hello', headers: {} }, null) The line passed to the regex test is Line 552 in 70844a9
This case works, so i don't get your point. Even without But if you have a solution for this, raise a PR or a working example |
These two tokens does not seem to work:
Ref:
Any clue why those does not work? Even with the
allowUnsafeRegex
is does not work.The text was updated successfully, but these errors were encountered: