In article <[email protected]>,
 "andrew cooke" <[email protected]> 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

Reply via email to