I would like to have a CSV parser. However, I would like to have the following: the regex must check, that the CSV ends with a comma ,
(otherwise the regex must not consider the CSV as valid)! If CSV is OK, then I will extract the text between ,
.
Example:
hello,world,end, //OK. CSV ends with ",". There are 3 matches: 'hello' 'world' 'end'
aa,bb,cc //NOT ok. CSV doesn't end with ",". No matches.
I have a question to the regex suggested by @Denomales. If the CSV contains quoted parts, there is always a match that contains only a quotation mark. Is it possible to avoid it?