def replace_last(string, old, new):
    """
    Replace the last occurrence of a pattern in a string

    :param string:
        string
    :type string: ``str``

    :param old:
        string to find
    :type old: ``str``

    :param new:
        string to replace
    :type new: ``str``

    :returns: ``str``
    """
    return string[::-1].replace(old[::-1], new[::-1], 1)[::-1]