Mecha CMS

Do something if URL path matched with pattern.

$route->pattern()

Set a route with plain regular expression pattern.

Route::pattern($pattern, $fn = false, $stack = null);

Example:

Route::pattern('#^blog(?:\/([^\/]+))?(?:\/(\d+))?$#', function($slug = "", $step = 1) { … });