How can I parse quoted CSV in Perl with a regex?

前端 未结 7 1451
青春惊慌失措
青春惊慌失措 2020-11-30 09:10

I\'m having some issues with parsing CSV data with quotes. My main problem is with quotes within a field. In the following example lines 1 - 4 work correctly but 5,6 and 7 d

7条回答
  •  一整个雨季
    2020-11-30 09:48

    Finding matching pairs using regexs is non-trivial and generally unsolvable task. There are plenty of examples in the Jeffrey Friedl's Mastering regular expressions book. I don't have it at hand now, but I remember that he used CSV for some examples, too.

提交回复
热议问题