How do I split apart a CSV string in Ruby?

后端 未结 6 692
醉话见心
醉话见心 2021-01-06 13:43

I have this line as an example from a CSV file:

2412,21,\"Which of the following is not found in all cells?\",\"Curriculum\",\"Life and Living Processes, Lif         


        
6条回答
  •  时光说笑
    2021-01-06 14:32

    text=<

    output

    $ ruby test.rb
    ["2412", "21", "Which of the following is not found in all cells?", "Curriculum", "Life and Living Processes, Life Processes", "", "", "", "1", "0", "endofline"]
    

提交回复
热议问题