import re


def rmTermCtrlSeq(s):
    """
    Remove Terminal CSI sequences from s

    see https://en.wikipedia.org/wiki/ANSI_escape_code
    """
    tcsReStr = '\x1b\\[[\x30-\x3F]*[\x20-\x2F]*[\x40-\x7E]'
    tcsRe =  re.compile(tcsReStr)
    return re.sub(tcsRe, '', s)