def get_regex_for_datetime_format(format_):
    """
    Generate a regex pattern for a given datetime format string.

    Parameters:
        format_ (str): The datetime format string.

    Returns:
        str: A regex pattern corresponding to the datetime format string.
    """
    # Replace all format symbols with their regex patterns.
    return dt_format_symbols_re.sub(lambda m: dt_format_to_regex[m.group(0)], format_)

    Generate a regex pattern for a given datetime format string.

    Parameters:
        format_ (str): The datetime format string.

    Returns:
        str: A regex pattern corresponding to the datetime format string.
    
parse.py