Disable th usade of "-" on {pseudovariables}
This commit is contained in:
		| @@ -43,12 +43,12 @@ class Router { | ||||
|      *     callback    - Contiene el callback en formato Namespace\Clase::Método. | ||||
|      */ | ||||
|     private static function parse($path, $callback) { | ||||
|         preg_match_all('/{([\w-]+)}/s', $path, $matches, PREG_PATTERN_ORDER); | ||||
|         preg_match_all('/{(\w+)}/s', $path, $matches, PREG_PATTERN_ORDER); | ||||
|         $paramNames = $matches[1]; | ||||
|  | ||||
|         $path = preg_quote($path, '/'); | ||||
|         $path = preg_replace( | ||||
|             ['/\\\{[\w-]+\\\}/s'], | ||||
|             ['/\\\{\w+\\\}/s'], | ||||
|             ['([^\/]+)'], | ||||
|             $path); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user