in reply to Remove text formatting from raw irc socket data?
maybe match on the possible colors? Something like (5|14|12|7) instead of \d+ ? Note I'm not familiar with the context here though .. is it a limited set? Even it is, there might still be problems .. like if 1 and 12 are valid colors, then any filename starting with a 2 when the color is 1 will be very problematic ...