Dear All,
I am trying to replace consequtive letters with a single one:
My code is:
mutate(word = str_replace_all(word, "(.)\1+", "\1"))
Everything seems to work but I checked and word "well" has become "wel".
How can I modify my regex?
I tried
mutate(word = str_replace_all(word, "(.)\2+", "\1"))
but it throws mistake
Please help