I have text like this:
[1;34mYou see exits leading [0;37m[1;34mnortheast, south, and northwest.
I need to detect all the ANSI codes (they all look like [1;34m or similar), and then return the whole phrase in mIRC codes (using the identifier $ansi2mirc). Where there is a different ANSI code, it needs to find the new color for when it changes, so there could be several different ANSI codes in a sentence, meaning that there would be several different colors. It has to find all of them. Thanks.
Note: Putting the whole thing, if there is more than once ANSI code, into $ansi2mirc returns an error, so that's not a possibility.