I want to read a local txt file and read the text in this file. After that i want to split this whole text into Strings like in the example below .
Example : Lets say
It may depend on how the file is encoded, so I would likely do the following:
String.split("(\\n\\r|\\n|\\r){2}");
Some text files encode newlines as "\n\r" while others may be simply "\n". Two new lines in a row means you have an empty line.