<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
On Thu, 4 Dec 2008 at 20:54, Terry Reedy wrote:
[snip]
I have often wished that in 'split' I could specify a _set_ of characters
on which the string would be split, in the same way the default list
of whitespace characters causes a split where any one (or more) of
them appears.  But instead the string argument is a multi-character
separator.  (Which is sometimes useful and I wouldn't want to lose the
ability to specify a multi-character separator!)

import re
re.split('[,.]','blah,blah.blah')
['blah', 'blah', 'blah']

-Mark


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to