Skip to content

Commit

Permalink
Allow - character in URITemplate parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nohponex committed Mar 29, 2016
1 parent d86fd03 commit f59d497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/URIStrategy/URITemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function test($URITemplate, $URI)
// replace all named parameters {id} to named regexp matches
$template = preg_replace(
'/(.*?)\{([a-zA-Z][a-zA-Z0-9_]+)\}(.*?)/',
'$1(?P<$2>[0-9a-zA-Z_]+)$3',
'$1(?P<$2>[0-9a-zA-Z_\-]+)$3',
$template
);

Expand Down

0 comments on commit f59d497

Please sign in to comment.