I have the lines from a CSV file:
315,"Misérables, Les (1995)",Drama|War
315,Big Bully (1996),Comedy|Drama
I want to split the line and make a list of 3 elements and I need a general REGEX expression that splits where it encounters ',' but since the title may have a comma (As shown in the first line), I need to skip the parsing of the title. A title that has commas has also quotation marks but I need the expression to work for both cases. Is it possible doing it with REGEX?
I'm trying to learn REGEX by myself and I'm having difficulties understanding some cases. I could really appreciate your help!
""? If so, you can first try to split the string by them, if you get 3 items, you are done, if not, split by comma