Using the re module (Regular expressions)

Peter Hansen peter at engcorp.com
Wed Sep 27 03:06:32 EDT 2000


Maybe partly because you've misspelled the word "Received".  :-)  (Or
are you really trying to catch a misspelled line like that?)

(In grade school we poor native English speakers had to learn, along
with 423 other rote memorization drills this one: "'i' before 'e' except
after 'c' or sounding like 'a' as in 'neighbour' or 'weigh'".  

And that's without even going into the fact that we poor Canadians had
to learn the difference between 'neighbour' and the American version
'neighbor', and why we used the British spelling in that case but don't
use words like 'spanner' and 'boot'....)

"Morten W. Petersen" wrote:
> 
> I want to match a string, 'Returned-Path: <someuser at somehost>\nRecieved:'.
> 
> Why doesn't re.compile(r'Return-Path:\s<.*>^Recieved:',re.MULTILINE) return
> a search object that'll match that line?
> 
> Thanks in advance.
> 
> -Morten

-- 
Peter Hansen



More information about the Python-list mailing list