You can modify the regular expression for each part of the route and thus allow additional /
. Your route could look like this:
Route::set('test', '<question>/test/<id>',
array(
'question' => '[^.,;?\n]+',
'id' => '\d+',
))
->defaults(array(
'controller' => 'Test',
'action' => 'index',
));
<...>
evaluates to [^/.,;?\n]++
- so remove the slash (since you want to allow it) and the additional plus and you have the one you looked for.
The URI /foo/bar/hello/test/5
will now be caught and you'll get the parameters
Array
(
[question] => foo/bar/hello
[id] => 5
)
accessible via $this->request->param()