in reply to Matching double characters and insertion

Hello,

You can also do:

$str =~ s{((.)\2*)}{join'x',split(//,$1)}eg;
Hope this helps,,,

Aziz,,,

  • Comment on Re: Matching double characters and insertion