The solution using re.split() function:
import re
cStr = '"aaaa","bbbb","ccc,ddd"'
newStr = re.split(r',(?=")', cStr)
print newStr
The output:
['"aaaa"', '"bbbb"', '"ccc,ddd"']
,(?=")
- lookahead positive assertion, ensures that delimiter ,
is followed by double quote "
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…