I'm trying to work with a String that is structured like this:
3882027944,Yes,"A specific website or app (please provide the answer)",
"Weather Underground, also local tv news half the time.",
"Somewhat likely","30 - 44", Male, "$10,000 to $24,999",
"West North Central"
(Linebreaks for clarity, not in the original text)
I've been trying to do this using the nextToken()
function in Java. I'm trying to split the string by each part between the commas. However, if a String contains a comma (e.g. Weather Underground, also local...
), it should not split there.
So my question is: Is there a way to split on a combination of tokens, so that I can split on ","
instead of every seperate ,
?