'Two tables need to be made, one which contains the indexes of all
readable characters, and one which contains the indexes of all ANSI
escapes. It\'s important to remember that ANSI escapes require more
that one character at a time, though no readable character needs more
than one character, since the unicode base class abstracts that away
from us. However, several readable characters can be placed in a row.
We must use regexes here to figure out where all the escape sequences
are hiding in the string. Then we use the ranges of their starts and
ends to create a final, comprehensive list of all indexes which are
dedicated to code, and all dedicated to text.
It\'s possible that only one of these tables is actually needed, the
other assumed to be what isn\'t in the first.'

def _get_indexes(self):

    code_indexes = []
    for match in self.parser.ansi_regex.finditer(self._raw_string):
        code_indexes.extend(range(match.start(), match.end()))
    if (not code_indexes):
        return (code_indexes, list(range(0, len(self._raw_string))))
    char_indexes = [i for i in range(len(self._raw_string)) if (i not in code_indexes)]
    return (code_indexes, char_indexes)
