split problem if the delimiter is inside the text limiter

rewonka rewonka at gmail.com
Wed Mar 18 12:45:14 CET 2009


Hi,

I had a problem, i would like to process a file into a PSQL, but in
the file the delimiter char is ':'
and i have the same charater inside the text field also.
something like this:
text = 1:23:34:"sample: text":" something"
if I use text.split(':')
it will be ['1', '23', '34', '"sample', 'text"', 'something']
but it's not good for me, because the delimiter is in text limiter  "
"

is it a solution, that is fast to process ? so i don't need to split
by "hand made" function

Rew



More information about the Python-list mailing list