From 9d4178fd39e9f311b941dbbe1c7ef73f5e5e0654 Mon Sep 17 00:00:00 2001 From: honzapospi Date: Wed, 9 Nov 2016 15:15:06 +0100 Subject: [PATCH] Fix regexp. Accept . and _ in path parameter. --- src/Route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Route.php b/src/Route.php index c62dff7..72b692a 100644 --- a/src/Route.php +++ b/src/Route.php @@ -28,7 +28,7 @@ public function __construct($pathPattern, $method, $className){ $vars = $matches[0]; $strtr = array(); foreach($vars as $var){ - $strtr[$var] = '[a-zA-Z0-9]+'; + $strtr[$var] = '[a-zA-Z0-9._]+'; } $this->vars = $vars; $this->regexp = strtr($pathPattern, $strtr);