diff --git a/src/Nelmio/Alice/Instances/Collection.php b/src/Nelmio/Alice/Instances/Collection.php index 3ef25e9db..295d6d4b8 100644 --- a/src/Nelmio/Alice/Instances/Collection.php +++ b/src/Nelmio/Alice/Instances/Collection.php @@ -145,7 +145,7 @@ protected function getKeysByMask($mask) if (!isset($this->keysByMask[$mask])) { $this->keysByMask[$mask] = array_values( preg_grep( - '{^'.str_replace('*', '.+', $mask).'$}', + '{^'.str_replace('\\*', '.+', preg_quote($mask)).'$}', array_keys($this->instances) ) );