a regexp riddle: re.search(r'(?:(\w+), |and (\w+))+', 'whatever a, bbb, and c') =? ('a', 'bbb', 'c')

Aahz aahz at pythoncraft.com
Fri Nov 26 14:57:03 EST 2010


In article <ad755502-bf79-46ea-b7ee-57ac6f7ee1cf at z26g2000prf.googlegroups.com>,
Phlip  <phlip2005 at gmail.com> wrote:
>
>Thanks all for playing! And as usual I forgot a critical detail:
>
>I'm writing a matcher for a Morelia /viridis/ Scenario step, so the
>matcher must be a single regexp.

Why?  (You're apparently the author of Morelia, but I don't really
understand it.)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Think of it as evolution in action."  --Tony Rand



More information about the Python-list mailing list