import re


def is_ext_code(s: str) -> bool:
    """ Returns True if `s` appears to be a single extended 256 escape code.
    """
    return re.match('^\033\\[((38)|(48));5;\\d{1,3}m$', s) is not None