Closed ve3 closed 3 years ago
I have a route like this.
/* @var $Rc \FastRoute\RouteCollector */ $Rc->addRoute('GET', '/countries/{country:[a-z]{3}}/states', 'handler');
This regular expression work correctly on normal PHP code but not working with FastRoute.
[a-z]{3}
It will be matched any A-Z character 3 times. Example: http://localhost/app/countries/BEL/states (get Belgium states/regions).
OK, It have to be upper case
$Rc->addRoute('GET', '/countries/{country:[A-Z]{3}}/states', 'handler');
I have a route like this.
This regular expression work correctly on normal PHP code but not working with FastRoute.
It will be matched any A-Z character 3 times. Example: http://localhost/app/countries/BEL/states (get Belgium states/regions).