in reply to duplicate string with regular expression
s/((?:(?:\w+\s+){2})|\.{2})/substr($1, 0, length($1)\/2)/eg; [download]