private static function buildRegex(string $expression, bool $is_prefix = false) : string
    {
        $regex  = self::REGEX_DELIMITER . '^';
        $regex .= preg_replace(array_keys(self::$datatypes), self::$datatypes, $expression);
        $regex .= $is_prefix ? '(.*)' : '';
        $regex .= '$' . self::REGEX_DELIMITER;
        return $regex;
    }
private static function buildRegex(string $expression, bool $is_prefix = false) : string
    {
        $regex  = self::REGEX_DELIMITER . '^';
        $regex .= preg_replace(array_keys(self::$datatypes), self::$datatypes, $expression);
        $regex .= $is_prefix ? '(.*)' : '';
        $regex .= '$' . self::REGEX_DELIMITER;
        return $regex;
    }
private static function buildRegex ( string $ expression , bool $ is_prefix = false ) : string { $ regex = self :: REGEX_DELIMITER . '^' ; $ regex .= preg_replace ( array_keys ( self :: $ datatypes ) , self :: $ datatypes , $ expression ) ; $ regex .= $ is_prefix ? '(.*)' : '' ; $ regex .= '$' . self :: REGEX_DELIMITER ; return $ regex ; }
Build a complete regular expression

@param string $expression the route to evaluate
@param bool $is_prefix    is the route a route prefix

@return string    the complete regular expression
Build a complete regular expression