I have this text:
text = '"Friend", "One, Two, Three", "something else"'
I want to convert it to an array:
array = [
"Friend",
"One, Two, Three",
"something else"
]
How can I do it in Ruby? Simple split()
won't work, since ,
may be inside some elements (like in this example). Maybe there are some libraries for that?