From 9fdd779dcf3c67300c15bf6025b8cffee2c376b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20=C5=81ugowski?= Date: Mon, 22 Feb 2016 17:37:27 +0100 Subject: [PATCH] Posibility to add or conditions in named parameters [ | ] --- src/Route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Route.php b/src/Route.php index e8bada2..e638fb9 100644 --- a/src/Route.php +++ b/src/Route.php @@ -134,7 +134,7 @@ private function preparePattern() return isset($this->paramRules[$match['name']]) ? '(' . $this->paramRules[$match['name']] . ')' : '([\w-]+)'; }, $this->getUrl()); - return sprintf('|^%s$|', $pattern); + return sprintf('~^%s$~', $pattern); } /**