split string but ignore sep inside double quotes

Jonno jonnojohnson at gmail.com
Wed Apr 13 16:59:34 CEST 2011


All,

I have the following unicode object:
u'3,"Some, text",more text'

and I want to split it into a list like this:
[3,"Some, text", more text]

In other words I want to split on the comma but not if it's inside a
double-quote.

Thanks.



More information about the Python-list mailing list