def split_string(self, string):
        self.actions = []
        start = 0

        for match in ANSI_PATTERN.finditer(string):
            raw = string[start:match.start()]
            substring = SPECIAL_PATTERN.sub(self._replace_special, raw)
            if substring or self.actions:
                yield substring
            start = match.end()

            self.actions = []
            groups = [x for x in match.groups() if x is not None]
            params = [ param for param in groups[1].split(';') if param ]
            if groups[0].startswith('['):
                # Case 1: CSI code.
                try:
                    params = list(map(int, params))
                except ValueError:
                    # Silently discard badly formed codes.
                    pass
                else:
                    self.set_csi_code(groups[2], params)

            elif groups[0].startswith(']'):
                # Case 2: OSC code.
                self.set_osc_code(params)

        raw = string[start:]
        substring = SPECIAL_PATTERN.sub(self._replace_special, raw)
        if substring or self.actions:
            yield substring
Send a groupchat message.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/frontend/qt/console/ansi_code_processor.py/AnsiCodeProcessor.split_string--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/muc.py/MUCClientProtocol.groupChat