Actually, a RFC on the IRC protocol can be found
here. It has some pseudo regular expressions there too to explain how it's formatted. Quite useful.
When I wrote my IRC engine, I found regexes invaluable. They were key in extracting data from strings quickly. You might want to look into
pcre, which is basically an API for making and using perl-like regular expressions. It's quite good, and lots of high profile projects use it. There's a window port too.