hyper-express icon indicating copy to clipboard operation
hyper-express copied to clipboard

Path parameter regexp

Open Viper-Bit opened this issue 3 weeks ago • 2 comments

hi @kartikk221, how about adding regexp in path (just path parameters or whole path) ? path parameter:

/users/:id(\\d+)/:tab(home|photos|bio)

whole path example:

/(user|u)/:id(\\d+)

we can use https://github.com/pillarjs/path-to-regexp to convert path to regexp or checking for ( ) in parse_path_parameters after each recognized path parameter

Viper-Bit avatar Jun 15 '24 10:06 Viper-Bit