def str_format_old_to_new(string):
    """

    convert old format style to new style. Works for digits only

    %05d is converted to {:05d}

    :param string:

    :return:

    """
    import re
    return re.sub('%(\\d*d)', '{:\\1}', string)
