Answer the question
In order to leave comments, you need to log in
Why doesn't regex work in router?
Here is the router $app->get('/{id:(9|11)}', 'HomeController:index');
Here is the error:
Regex "(9|11)" for parameter "id" contains a capturing group
Answer the question
In order to leave comments, you need to log in
Everything, of course, depends on the internals of this router, but this is how it will most likely work:(?:9|11)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question