I would like to find all the double letters in a string and replace them with the same letter + another character. I tried:
$string =~ s/.{2}/.2/gi;
But that doesn't work. I want to f.e. 'll' to become 'l2'. Can that be easily done?
Thanks in advance,
J
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.