I have a file like -
--------------
abc
efg
hig
---------------
xyz
pqr
---------------
fdg
gege
ger
ger
---------------
Whats the best way to write java code which parses this file and creates separate List for each of the block of text between dashes. For example -
List<String> List1 = {abc, efg, hig}
List<String> List2 = {xyz, pqr}
List<String> List3 = {fdg, gege, ger, ger}