0👍
If you try your path definition in express-route-tester (link found on Path-to-RegExp – library used by Vue Router to match routes) you will see it matches only one letter
- you need to move
+
inside (/:identifier(\\b(?:(?!word)\\w+)\\b)
) - and still this will not match for example
wordss
Result: /:identifier(\b(?:(?!word\b)\w+)\b)
But maybe you are trying to solve something with regex what can be solved different way ? Do you know the Vue Router takes routes in order ? So if you define two routes:
/word
/:id
First will take precedence…
- [Vuejs]-Vue JavaScript Mutiselect option value not working
- [Vuejs]-How to use php variable in Vue.js template literal?
Source:stackexchange.com