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

Advanced Matching Patterns not working properly #3078

Closed
thierri opened this issue Dec 24, 2019 · 1 comment
Closed

Advanced Matching Patterns not working properly #3078

thierri opened this issue Dec 24, 2019 · 1 comment

Comments

@thierri
Copy link

@thierri thierri commented Dec 24, 2019

Version

3.1.3

Reproduction link

https://codepen.io/thierri-oliveira/pen/wvBeBzV

Steps to reproduce

Just click on the first link (test-one)

What is expected?

The route show match with the definition and the param id_one should be captured.

What is actually happening?

The route don't match and the param id_one its not captured.


If you test exactly the same path and regex on the express route tester (http://forbeslindesay.github.io/express-route-tester/) provided by path-to-regexp package, everything works fine.

@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Dec 24, 2019

It only works on 0.1.7 but we are using 1.7.x where it doesn't work

Here is a version that works: { path: '/test-dos/:id_one([a-z]+)-:dos([a-z]+)' },. It is then possible to use the props option to reshape that property into a single one

@posva posva closed this Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.