Hello, I cannot figure out a way to find a regular expression that would match one and only one of these two strings:
s1 = ' how are you'
s2 = ' hello world how are you'
All I could come up with was:
patt = re.compile('^[ ]*([A-Za-z]+)[ ]+([A-Za-z]+)$')
Which of course does not work. I cannot express the fact: sentence
have 0 or 1 whitespace, separation of group have two or more
whitespaces.
Any suggestion ? Thanks a bunch !
Mathieu
--
http://mail.python.org/mailman/listinfo/python-list
