private function createRegex(string $eventPattern): string
    {
        return \sprintf('/^%s$/i', \preg_replace(
            \array_keys(self::$wildcardsSeparators),
            \array_values(self::$wildcardsSeparators),
            \str_replace('\#', '#', \preg_quote($eventPattern, '/'))
        ));
    }