my $word = q{-\w'(),}; s{ (^|[^$word]) ( (?:([$word])\3)+ ) (?=[^$word]|$) }{ my @x = ($1, $2); $x[1] =~ s/(.)./$1/g; join '', @x; }xige; }