Hi,
Okay it might not be complex for some, but it is for me.
Let's say I have a comma delimited
String like this:
1,0,5,"Hello","Hello, my name is Barry."
What is the best way to split this String into an array while preserving the comma in the last String. If I use StringTokenizer and use a comma as my delimiter I will get this:
1
0
5
"Hello"
"Hello
my name is Barry."
But of course that's not what I want. I want only 5 elements in the array with the last one being "Hello, my name is Barry." Also what if I had multiple commas in an element?
Parsing is definitely not my strong point I will admit. So if anyone could give me a little nudge I would be very grateful.
many thanks,
Barry