Simplify regex.

Simplified the method for removing trailing periods in some of the
results. Instead of using Java's endsWith() / subString(), now
reReplace() is used.