Regular exprssion for IRC messages

Gabriel Genellina gagsl-py2 at
Wed Jul 22 01:43:07 EDT 2009

En Fri, 17 Jul 2009 13:59:47 -0300, nohics nohics <nohics at>  

> When an IRC client receive a messages, this message in in a special  
> format
> defined here: Message format in pseudo
> BNF<>(
> I want to transforme the message format defined in the irc protocole in  
> the
> last link, to a regular expression to get the nickname, the username, the
> host, the commad, it's arguments if exist, and the message after ":"

You may want to use the pyparsing module instead of a monstruous and  
unmantainable regular expression:

Gabriel Genellina

More information about the Python-list mailing list