<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def strip_escape(string='', encoding="utf-8"):
 # pylint: disable=redefined-outer-name """ Strip escape characters from string. :param string: string to work on :param encoding: string name of the encoding used. :return: stripped string """

    matches = []
    try:
        if hasattr(string, "decode"):
            string = string.decode(encoding)
    except Exception: # pylint: disable=broad-except
        # Tried to decode something that is not decodeable in the specified encoding. Let's just
        # move on.
        pass
    try:
        for match in ansi_eng.finditer(string):
            matches.append(match)
    except TypeError as error:
        raise TypeError("Unable to strip escape characters from data {}: {}".format(
            string, error))
    matches.reverse()
    for match in matches:
        start = match.start()
        end = match.end()
        string = string[0:start] + string[end:]
    return string