Hi Members,
I have to read a file and append to string. In this i have to check for my start and end 'Delimiter'. and the data read from file should be appended to a first string until the 'start' delimiter is found, once the start delimiter is found, the remaining part of the file, upto the 'end delimiter' should be appended to another string.
Example: File.txt
"This is a sample file for your information. JESUS Please help me in this , this logic code should be done in java. MARY I tried using String.split() function but i could not get the solution."
This is the content of the file. Here im setting my 'start delimiter' as 'JESUS' and 'end delimiter' as 'MARY' and until the start delimiter is found i should read the data from file and append it to first string and once after the first delimiter is found and until the end delimiter is found i have to append it to another string.
So, the output should be :
String firstData = "This is a sample file for your information. I tried using String.split() function but i could not get the solution.";
String secondData = "Please help me in this , this logic code should be done in java. ";
Looking forward for the logic code done in Java.
Regards,
Prabhu.