Skip to content

Commit

Permalink
Fix regexp. Accept . and _ in path parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
honzapospi committed Nov 9, 2016
1 parent 13a4082 commit 9d4178f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9d4178f

Please sign in to comment.