The color codes rule is more complex.

a color code with 1-digit color number (0-9) and alphabetic text (a-z) == colored text
a color code with 2-digits color numbers (00-15) and alphabetic text (a-z) == colored text
a color code with 1-digit color number (0-9) and text which starts with a number (9abc) == 2 digits color number + remaining text (unwished)
a color code with 2-digits color numbers (00-15) and text which starts with a number (9abc) == colored text + the number and text

Keeping in mind that some people can use ^01 or ^1 for black color, or use a color between 10 and 15, the script has to detect if the next character is a letter or a number.
Regex is the solution?


Show me the steps to somewhere in the sky...