How to make Regex in Zend\Mvc\Router\Http\Regex case insensitive?
If I have
$route = Regex::factory(array(
'regex' => '/blog/(?<id>Test)',
'defaults' => array(
'controller' => 'Application\Controller\BlogController',
'action' => 'view',
'format' => 'html',
),
'spec' => '/blog/%id%',
));
'regex' => '/blog/(?<id>Test)i',
doesnt work. 'regex' => '/blog/(?<id>Testi)',
also doesnt work.
How to solve this?
your regex modifiers syntax is incorrect, try this:
/blog/(?i)(?<id>Test)