Re: rejecting newlines with re.match

2008-11-27 Thread MRAB
r0g wrote: Hi, I want to use a regex to match a string "poo" but not "poo\n" or "poo"+chr(13) or "poo"+chr(10) or "poo"+chr(10)+chr(13) "\n" is the same as chr(10). According to http://docs.python.org/library/re.html '.' (Dot.) In the default mode, this matches any character except a newlin

Re: rejecting newlines with re.match

2008-11-27 Thread Vlastimil Brom
2008/11/27 r0g <[EMAIL PROTECTED]> > Hi, > > I want to use a regex to match a string "poo" but not "poo\n" or > "poo"+chr(13) or "poo"+chr(10) or "poo"+chr(10)+chr(13) > > ... > Thanks, > > > Roger. > -- > http://mail.python.org/mailman/listinfo/python-list > Hi, if I understand correctly, that

rejecting newlines with re.match

2008-11-26 Thread r0g
Hi, I want to use a regex to match a string "poo" but not "poo\n" or "poo"+chr(13) or "poo"+chr(10) or "poo"+chr(10)+chr(13) According to http://docs.python.org/library/re.html '.' (Dot.) In the default mode, this matches any character except a newline. If the DOTALL flag has been specified, thi