in reply to Re: More efficient way to truncate long strings of the same character
in thread More efficient way to truncate long strings of the same character
And in 5.10, use of the \K operator may be faster (but I haven't checked it)s/(.)\1{3,}/$1$1$1/g;
s/(.)\1\1\K\1+//g;
|
|---|