in reply to Remove text formatting from raw irc socket data?

A quick google search says the color numbers are 0-15, and can be followed by a comma and a background color. Something like this should match it:
(?:1[012345]|\d)(?:,(?:1[2345]|\d))?

Looks like there are some other commands for bold, italic, etc. You might want to make sure your code deals with those properly, too.

Update: Fix bug ikegami pointed out (oops!).

Replies are listed 'Best First'.
Re^2: Remove text formatting from raw irc socket data?
by ikegami (Patriarch) on Sep 25, 2005 at 05:14 UTC
    That won't match colour 10 or 11 properly.