How do I check for adjacent characters and if they match, delete one?

May be, it is not able to do via for each activity @Vlad_Svitelskyi

Not able to understand your requirement

Regards
Gokul