in reply to duplicate string with regular expression

Just a different flavor of the same thing:
s/((?:(?:\w+\s+){2})|\.{2})/substr($1, 0, length($1)\/2)/eg;