php - CakePHP Router::connect and regex -


i'm having trouble redirection in config/routes.php file

i can't find 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' => '(.*)',                           'pass' => array('zipcode'),                           )                     ); 

i match url city ends 'arrondissement' i'm total noob in regex

thank you.

with regex can use dollar symbol match end of string.

simply 'arrondissement$'

and drop stuff @ beginning.


Comments