Welcome Guest, Not a member yet? Register   Sign In
Route not work with regex
#3

(This post was last modified: 01-27-2022, 11:46 PM by iRedds.)

PHP Code:
$routes->addPlaceholder('unique''[a-z0-9]{40}|all');
$routes->addPlaceholder('tab''done|in-progress');

$routes->get('(:unique)''Pages::browse/$1');                    // #^([a-z0-9]{40}|all)$#u
$routes->get('(:unique)/(:tab)''Pages::browse/$1/$2');   // #^([a-z0-9]{40}|all)/(done|in-progress)$#u

in your implementation
// #^(([a-z0-9]{40}|all)$)$#u
// #^(([a-z0-9]{40}|all)$)/((?:^|done|in-progress)$)$#u 
Reply


Messages In This Thread
Route not work with regex - by mylastof - 01-27-2022, 09:10 PM
RE: Route not work with regex - by kenjis - 01-27-2022, 10:01 PM
RE: Route not work with regex - by iRedds - 01-27-2022, 11:43 PM
RE: Route not work with regex - by mylastof - 01-28-2022, 06:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB