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 "
More Related Contents:
- How to split pipe-separated string into a list? [duplicate]
- How do you split a list into evenly sized chunks?
- How can I split a text into sentences?
- Split a string by a delimiter in python
- Split string on whitespace in Python [duplicate]
- Why are empty strings returned in split() results?
- Splitting a string into words and punctuation
- Product code looks like abcd2343, how to split by letters and numbers?
- Get last “column” after .str.split() operation on column in pandas DataFrame
- Splitting a semicolon-separated string to a dictionary, in Python
- sscanf in Python
- How do I split a string into a list?
- python split a string with at least 2 whitespaces
- When splitting an empty string in Python, why does split() return an empty list while split(‘\n’) returns [”]?
- Splitting a string by list of indices
- Quickest way to make a get_dummies type dataframe from a column with a multiple of strings
- Split a string only by first space in python
- Split string on commas but ignore commas within double-quotes?
- How to split strings inside a list by whitespace characters
- How would I get everything before a : in a string Python
- How to Split Image Into Multiple Pieces in Python
- Attribute Error: ‘list’ object has no attribute ‘split’
- Python regex: splitting on pattern match that is an empty string
- Make Python Sublists from a list using a Separator
- How to transform string of space-separated key,value pairs of unique words into a dict
- How to split a string by commas positioned outside of parenthesis?
- Pandas Dataframe: split column into multiple columns, right-align inconsistent cell entries
- How to split a Python string on new line characters [duplicate]
- Python: Split NumPy array based on values in the array
- Split text after the second occurrence of character