Parameters are by default now using regex [\w\-]+ (supports dashes) to avoid confusion.

This commit is contained in:
Simon Sessingø
2021-03-18 03:24:47 +01:00
parent fb726c3613
commit 19b1a14dec
4 changed files with 27 additions and 9 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ use Pecee\SimpleRouter\Router;
abstract class Route implements IRoute
{
protected const PARAMETERS_REGEX_FORMAT = '%s([\w]+)(\%s?)%s';
protected const PARAMETERS_DEFAULT_REGEX = '[\w]+';
protected const PARAMETERS_DEFAULT_REGEX = '[\w\-]+';
public const REQUEST_TYPE_GET = 'get';
public const REQUEST_TYPE_POST = 'post';