We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2366121 + 559196b commit c45aed8Copy full SHA for c45aed8
src/Splashsky/Router.php
@@ -131,12 +131,12 @@ private static function tokenize(string $uri)
131
$matches = $matches[1];
132
133
foreach ($matches as $match) {
134
- $pattern = "/(?:{".$match."})+/";
+ $pattern = '{'.$match.'}';
135
136
if (in_array($match, $constraints)) {
137
- $uri = preg_replace($pattern, '('.self::$constraints[$match].')', $uri);
+ $uri = str_replace($pattern, '('.self::$constraints[$match].')', $uri);
138
} else {
139
- $uri = preg_replace($pattern, self::$defaultConstraint, $uri);
+ $uri = str_replace($pattern, self::$defaultConstraint, $uri);
140
}
141
142
0 commit comments