I have a simple java code that reads text csv file that contains sentences with double quotations: "sentence1","sentence2","sentence3". I want to read some of these sentences(e.g, sentence 1 and 3). I created a buffer reader and used readLine()
then used: tokens = fileLine.split(",");
where tokens is an array of strings.
I accessed the sentences I'm interested in using the array index as: tokens[0]
, tokens[3]
. The problem is that, I want the sentences only without the double quotations. But my program saved the sentences with "". How can I improve the parsing technique so I can save the sentences without "" ??