In article <mailman.277.1235073073.11746.python-l...@python.org>, "andrew cooke" <and...@acooke.org> wrote:
> i wonder what fraction of people posting with "bug?" in their titles here > actually find bugs? IMHO it ought to be an invariant that len(r.split(s)) should always be one more than len(r.findall(s)). > anyway, how about: > > re.findall('[A-Z]?[a-z]*', 'fooBarBaz') > > or > > re.findall('([A-Z][a-z]*|[a-z]+)', 'fooBarBaz') That will do it. Thanks! rg -- http://mail.python.org/mailman/listinfo/python-list