Re: regex for replacing \r\n

2006-08-07 Thread Patrick Bothe
abcd wrote: > [...] > ultimately i am trying to replace all \r\n with somethign else, say > BLAH. > > For example: > This is a message > on a new line > > would become: > This is a messageBLAHon a new line. Concluding from your question I think you might be happy with a simple string `.replace`:

regex for replacing \r\n

2006-08-07 Thread abcd
I am trying to get a regex that will match \r\n in a string. ultimately i am trying to replace all \r\n with somethign else, say BLAH. For example: This is a message on a new line would become: This is a messageBLAHon a new line. any ideas? i tried re.compile('\r\n').match("This is a message"