I have managed to split a CSV file based on the commas.
However, the CSV file contains things such as:
something, something, something
something, something, something
So far, I have done:
String[] array = str.split(",");
Therefore, where there is a new line, the last and first values of each line get merged into their own string. How can I solve this?
I actually want to do this, I know there are alternate ways to implement this, however.
Help?!
String.split() gets an regular expression as its argument, try “\n” or “,” expression.