Whenever I find an abbreviation within a sentence (like Mr., prf. and so on) I would like to delete the '\n' character at the end of each sentence that contains an abbreviated word. Any ideas are welcome.INPUT OUTPUT
My idea so far is:
List<String> pres = Arrays.asList("dl","Dl", "Prf", "Ing");
for(int i=1;i<4;i++){
if (z.contains(pres.get(i)))
f=z.indexOf(pres.get(i));
z.replaceFirst("\\n"," ");//how i can use my f here to get rid of next new line...?
}