Make it possible to enforce a format for a dynamic segment of the route, so we can write:
get("/products/:id", where("id", "[A-Z]{2}-\d{2}")).to(...)
This route would match paths such as /products/AB-123, but not /products/123456.
Anchors will not be supported in the RegExp since we want to match the entire segment.
Make it possible to enforce a format for a dynamic segment of the route, so we can write:
This route would match paths such as
/products/AB-123, but not/products/123456.Anchors will not be supported in the RegExp since we want to match the entire segment.