def create_futures_regex(input_symbol: str) -> str:
    """Creates a regular expression pattern to match the standard futures symbology.

    To create the regular expression pattern, the function uses the fact that within the
    ICE consolidated feed all the standard futures contracts are identified by the root
    symbol (a unique mnemonic based on the exchange ticker or the ISIN, where no exchange
    ticker is available), prefixed with the type and the optional session indicator, a
    backslash, and a delivery date (formatted as MYYdd, where M is the month code, YY
    are the last two digits of the year, and dd is 2-digit day of the month that is used
    only for those futures where the day of the month is required to identify the security).

    The function logic allows the user to pass a complete futures name, or to pass the
    root symbol prefixed by the type and optional session indicator, followed by a
    backslash and the * wildcard flag. In the former case, the resulting regex expression
    will be such that it will match only the specific security that is passed as an input
    (for example, by passing F:FDAX\\H21, the resulting regular expression will only
    match the DAX futures contract with expiration in March 2021). If only the symbol
    root (with all the necessary prefixes) followed by a backslash and the * wildcard
    flag, is passed as an input, the resulting regex will be such to allow matching all
    the possible combinations of month year (and optionally day) of expiration.

    Parameters
    ----------
    input_symbol: str
        A standard futures symbol consisting of the root symbol prefixed with the type
        identifier (F) and optional session indicator. If the user wants the function to
        produce a regular expression that can match all the possible combinations of
        month, year (and optionally day) expirations, then the root symbol will be followed
        by a backslash and the * wildcard flag (for example F:FDAX\\* will result in a
        regular expression that will match all the possible combinations of root symbol,
        month code, year and eventually day codes). Alternatively, if the user is only
        interested in creating a regular expression that matches literally only a
        specific contract, the passed instrument symbol (prefixed with the type
        identifier and optional session indicator) will be followed by a backslash and a
        specific maturity, identified by the month code followed by the 2-digit year code
        and the 2-digit day code for those contracts that are identified also by the day
        of the month.

    Returns
    -------
    str
        Depending on the input symbol, the function returns a regular expression pattern
        that either matches literally a specific security symbol or one that matches all
        the possible maturities of the root symbol passed as an input.
    """
    if not input_symbol.endswith('*'):
        symbol_components = input_symbol.split("\\")
        return rf"{symbol_components[0]}\\{symbol_components[1]}"
    else:
        symbol_root = input_symbol.split("\\")[0]
    return rf"{symbol_root}\\[A-Z][0-9]{{2,4}}"