Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
fix: this regex should be ungreedy
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-magosa committed Nov 26, 2014
1 parent 479107d commit 049117d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/KM/Saffron/RouteCompiler.php
Expand Up @@ -85,7 +85,7 @@ protected function getDomainRegex(Route $route)

$regex = '';
foreach ($tokens as $token) {
if (preg_match('#^\{(?P<placeholder>\w+)\}(?P<delimiter>.)?$#s', $token, $match)) {
if (preg_match('#^\{(?P<placeholder>\w+)\}(?P<delimiter>.)?$#us', $token, $match)) {
$regex .= sprintf(
'((?P<%s>%s)%s)%s',
preg_quote($match['placeholder'], '#'),
Expand Down

0 comments on commit 049117d

Please sign in to comment.