You can check if any space
or newline
coming after .
.
You can use the regex : (\.(?=[\s\n\r]|$))
Code :
String input = "Unfortunately, this removed all other 'dots' as well. My paragraph includes dates like Jan.13, 2014 , words like U.S and numbers like 2.2. How can I remove only the full stops?\n"+"Somthing is there.\n"+"Hello someone . What is this something ? ";
String REGEX = "(\\.(?=[\\s\\n\\r]|$))";
String x=input.replaceAll(REGEX, " ");
OUTPUT
Unfortunately, this removed all other 'dots' as well My paragraph includes dates like Jan.13, 2014 , words like U.S and numbers like 2.2 How can I remove only the full stops?
Somthing is there
Hello someone What is this something ?
DEMO