I need help with a route pattern. I have URLs like this:
http://example.com/product/product-title-51
http://example.com/product/another-product-title-137
http://example.com/product/another-product-45-title-with-number-288-anywhere-178
...
I need to write a path pattern which will match the last number of a slug. That number is a product ID.
const router = new VueRouter({
routes: [{
path: '/product/:product',
component: PageProduct,
name: 'Product'
}]
})
What pattern can I use for this case? Or would you suggest a better solution for eShop product slug?