I'm trying to split a string every time there is a comma in it.
String myString = "\"Shire, Middle Earth\",Hobbits, J.R.R Tolkien";
My string, when printed out is: "Shire, Middle Earth",Hobbits, J.R.R. Tolkien
Notice that there is a space between Shire and Middle Earth
When I do the following...
String[] myString = line.split(",");
It counts the comma between the Shire and Middle Earth as a comma to split the data a (as it should). How can I get it to "ignore" that comma?