On 22 July, 06:43, "Gabriel Genellina" <gagsl-...@yahoo.com.ar> wrote: > En Fri, 17 Jul 2009 13:59:47 -0300, nohics nohics <noh...@gmail.com> > escribió: > > > When an IRC client receive a messages, this message in in a special > > format > > defined here: Message format in pseudo > > BNF<http://www.irchelp.org/irchelp/rfc/chapter2.html#c2_3_1>( > > > 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: > > http://pyparsing.wikispaces.com/ > > -- > Gabriel Genellina
Alternatively, if IIRC, the twisted framework has an IRC client, which automatically parses server messages. -- http://mail.python.org/mailman/listinfo/python-list