I'm having some trouble with redirection in config/routes.php file
I can't find the right regex
$_skill = '[A-Za-z\-]+'
Router::connect('/-:skill/:city-:zipcode:shit', array('controller' => 'redirects', 'action' => 'district'),
array('city' => '[A-Za-z-0-9\]+.(er|eme)-arrondissement',
'skill' => $_skill,
'zipcode' => $_zipcode,
'shit' => '开发者_Go百科(.*)',
'pass' => array('zipcode'),
)
);
I would like to match any url where city ends with 'arrondissement' but i'm a total noob in regex
thank you.
With most regex you can use the dollar symbol to match the end of a string.
simply 'arrondissement$'
And drop all the stuff at the beginning.
精彩评论