regulare expression searches and newlines

schmitthead at my-deja.com schmitthead at my-deja.com
Mon Apr 24 02:08:29 EDT 2000


I was doing a search like this:

searchobj = re.compile( r'^foobarbaz' )

where I was looking for something at the beginning of a line.  This
works well for native text files, but not when I was searching through
Linux files running on NT or NT files on Linux or some other variation
because of the newline difference, I guess.  Is there any way to handle
the general case?


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list