diff --git a/src/Route.php b/src/Route.php index cd8097e..c54d539 100755 --- a/src/Route.php +++ b/src/Route.php @@ -153,9 +153,10 @@ private function substituteFilter($matches) return $this->filters[$matches[1]]; } - return '([\w-%]+)'; + return '([\w\-\%]+)'; } + public function getParameters() { return $this->parameters; diff --git a/src/Router.php b/src/Router.php index e9bd478..ce59a17 100755 --- a/src/Router.php +++ b/src/Router.php @@ -121,7 +121,7 @@ public function match($requestUrl, $requestMethod = RequestMethodInterface::METH $params = array(); - if (preg_match_all('/:([\w-%]+)/', $routes->getUrl(), $argument_keys)) { + if (preg_match_all('/:([\w\-\%]+)/', $routes->getUrl(), $argument_keys)) { // grab array with matches $argument_keys = $argument_keys[1];