Re: re and escape character

2005-09-16 Thread Fredrik Lundh
Sinan Nalkaya wrote: > thats exactly what i want, how can i use DOTALL, by doing re.compile ? there's always the manual: http://docs.python.org/lib/node114.html compile(pattern[, flags]) Compile a regular expression pattern into a regular expression object, which can be used fo

Re: re and escape character

2005-09-16 Thread Sinan Nalkaya
Thomas Guettler wrote: >Am Thu, 15 Sep 2005 14:36:38 +0300 schrieb Sinan Nalkaya: > > > >>i re-format incoming messages like this, >>command = re.findall("^\002(.{2})\|.*\003$", response)[0] >>it works well but when response comes with escape characters , my >>command variable crashes, >>i cann

Re: re and escape character

2005-09-15 Thread Thomas Guettler
Am Thu, 15 Sep 2005 14:36:38 +0300 schrieb Sinan Nalkaya: > i re-format incoming messages like this, > command = re.findall("^\002(.{2})\|.*\003$", response)[0] > it works well but when response comes with escape characters , my > command variable crashes, > i cannot parse if response variable is