I have enormous text. The goal is to separate dots with spaces in this which are only in the end of sentences, but not in abbreviations, time, date or else. Doing like this:
String regex = "[a-z](\\.)\\s";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(text);
if(matcher.find())
text = text.replace(matcher.group(1), " " + matcher.group(1));
The result is not only things like "The end of sentence . Next sentence . ", but things like this as well: "Some numeric info 16 . 15 shouldn't match this regex . ".