I have written this piece of code that splits a string and stores it in a string array:-
String[] sSentence = sResult.split("[a-z]\.\s+");
However, I've added the [a-z] because I wanted to deal with some of the abbreviation problem. But then my result shows up as so:-
Furthermore when Everett tried to instruct them in basic mathematics they proved unresponsiv
I see that I lose the pattern specified in the split function. It's okay for me to lose the period, but losing the last letter of the word disturbs its meaning.
Could someone help me with this, and in addition, could someone help me with dealing with abbreviations? For example, because I split the string based on periods, I do not want to lose the abbreviations.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…