I try to remove dot only from end of each word in given text. (in java) for example:
input: java html. .net node.js php. output: java html .net node.js php
An elaborated solution based on Qtax's answer:
String s = "java html. .net node.js php."; System.out.println(s); s = s.replaceAll("(\\w)\\.(?!\\S)", "$1"); System.out.println(s);
Output:
java html .net node.js php