I am having strings like this \"aaaabbbccccaaffffddcfggghhhh\" and i want to remove repeated characters get a string like this \"abcadcfgh\".
A simplistic implementati
use this pattern /(.)(?=\1)/g and replace with nothing Demo
/(.)(?=\1)/g