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
Depending on your definition of word you could replace:
(\w)\.(?!\S)
with $1. Which would remove all . at the end of a word followed by a space or end of string.
$1
.