I am trying to figure out a way to split values based on a comma in regex but the problem is that I want to ignore commas that are inside the parenthesis ()
example :
'hist1234,geog293,lap_933,(a-20,110,60),(z-8,9,10),POLY5,9,3,8,ro water'
expected output :
['hist1234', 'geog293', 'lap_933', '(a-20,110,60)', '(z-8,9,10)', 'POLY5,9,3,8', 'ro water']
I tried: ,\s*(?![^()]*)) for the comma and ignoring the comma in brackets but im unsure about the ignoring if its a number followed by a comma