I'm trying to remove repeated chars from strings like I looooovvee this. It's awesomee. Very gooood.
to an output like: I love this. It's awesome, Very good.
I'm already using in PHP this instrunction $str=preg_replace("/(.)\1+/", "$1", $str);
But it outputs I love this. It's awesome. Very god.
The problem is in words that already should have repeated chars like 'good' or 'cool'