I am trying to split a large String using double quotations "\"" as the delimiter. For some reason, the split method doesn't seem able to locate occurrences of double quotes in my String. Code:
public void stripToDialog()
{
String[] parsedContent = content.split("\"");//content has a very large String stored in it.
for(String e: parsedContent)//When I print each element out, I only get the original String stored in content.
System.out.println(e);
}
So what is going on? How come the split method can't seem to detect double quotes?
An example for my desired results for a dummy String of "\"hasta la vista baby\" - Arnold S." would be an array of Strings that looks like: {"", "hasta la vista baby", " - Arnold S."}
In case it matters, I read the original String from a txt file using a FileReader object.