uncolorize(text)

def uncolorize(text):
    """ uncolorize(text)
    """
    match = re.match('(.*)\033\[[0-9;]+m(.+?)\033\[0m(.*)', text)
    try:
        return ''.join(match.groups())
    except:
        return text