Router Path substring

I cant seem to find a way to use regexp in router-PathPrefix to allow routing based on substring value. It's ok if I know exact url like domain.con\path*someID*
But I have applications that can have this someID in different places like or
Is there a way to substring that value, not knowing it's exact position relative to root path?
I tried:


or as simple as


None works.
Would appreciate any help.



1 Like

Hi! one question, in the rule docs there's this example:

PathPrefix(`/products/`, `/articles/{category}/{id:[0-9]+}`)

I couldn't find what exactly does the {category} bit do. Is it a special regex? is it just an example thact actually does nothing?

If I'm correct {category} is just a placeholder meaning {something_must_be_here}

I understand. However, I wonder if that is an actual valid regexp to put in a real configuration file. Otherwise, if that's just "stub", I think it may be misleading, and better use a real example instead, like in the other cases (e.g. "PathPrefix(`/products/`, `/articles/{category:.*}/{id:[0-9]+}`)".

I just want to clarify whether just writing {category} is equivalent to {category:.*}, or an invalid example.


EDIT: It looks a bug in the docs, as latest version shows a correct regexp usage.