"Kent Johnson" <[EMAIL PROTECTED]> wrote

Assuming the strings are non-overlapping, i.e. the closing "." of one
string is not the opening "." of another, you can find them all with
 import re
 re.findall(r'\..*?\.', text)

Hmm, my regex hopelessness comes to the fore again.
Why a *?
I would probably have guessed the pattern to be

\..+?\.

What am I missing?

Alan G.

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to