Improved regex for remove word delimiter for end of string