Question about regular expression

Tim Chase python.list at tim.thechases.com
Thu Oct 1 08:39:57 EDT 2015


On 2015-10-01 01:48, gal kauffman wrote:
> items = s.replace(' (', '(').replace(', ',',').split()

s = "name1  (1)"

Your suggestion doesn't catch cases where more than one space can
occur before the paren.

-tkc






More information about the Python-list mailing list