Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
dauglyon
dauglyon's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Help splitting a comma-separated string but ignoring commas in quotes.
[8 Replies]
26-Jun-2013 03:16 PM
Forum:
Programming Questions
I have a CSV formated like this:
20120807,1200,"I can't sleep, too much caffeine.",476,100,375,187,411,347,175
20120807,1300,I like bagels,476,101,375,187,431,347,175
20120807,1300,The man said he had "powers",476,101,375,187,431,347,175
20120807,1300,"And the he said, "I hate you."",476,101,375,187,431,347,175
And I am try to import it using this code:
String[] lines = loadStrings("data.csv");
String[] peices = split(lines[0], ",");
However, I have yet to figure out how to get processing to ignore the commas which are contained within quotes.
I've dug around on the web but didn't find anything. If anyone knows how to do this I would really appreciate the help!
«Prev
Next »
Moderate user : dauglyon
Forum