Terry J. Reedy <tjre...@udel.edu> added the comment: Did you read "Unfortunately, delimiter is represented by a character in C." in one of the answers? If so, this should be rejected. For the posted problem, I added the following.
>>> list(s[1:-1] for s in '"1234"||"abcd"||"a1s1"'.split('||')) ['1234', 'abcd', 'a1s1'] re.split is intended for general splitting tasks. The SO had other posted solutions that also do the job. So I do not see the need. Using commas both within quoted fields and between fields is semi-sensible, or at least widely done. Anyway, csv was designed for that and then generalized. I do not see the need to cater to something as foolish and rare as using a multichar delimiter that is also within fields. I suggest you post enhancement ideas on python-ideas first, as it is a better place for discussion and reaches more people. ---------- nosy: +terry.reedy stage: -> test needed versions: -Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15158> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com