public static function toRegEx(string $glob): string
    {
        $quoted = str_replace(['?', '*'], ['.', '.*'], $glob);
        $regExp = '~^' . $quoted . '$~';

        return $regExp;
    }
public static function toRegEx(string $glob): string
    {
        $quoted = str_replace(['?', '*'], ['.', '.*'], $glob);
        $regExp = '~^' . $quoted . '$~';

        return $regExp;
    }
public static function toRegEx ( string $ glob ) : string { $ quoted = str_replace ( [ '?' , '*' ] , [ '.' , '.*' ] , $ glob ) ; $ regExp = '~^' . $ quoted . '$~' ; return $ regExp ; }
Converts the glob to a regular expression.

@param string $glob

@return string
Converts the glob to a regular expression .