I am trying to split a string using a regular expression (re.split), but it's been a while since I've been using regular expressions.
The string looks like:
string = '"first, element", second element, third element, "fourth, element", fifth element'
I would like to split the string on each comma unless a substring is enclose by quotes.
The output should look like this:
output = ['"first, element"', 'second element', 'third element', '"fourth, element"', 'fifth element']