Replace consecutive characters with same single character
<p>I was just wondering if there is a simple way of doing this. i.e. Replacing the occurrence of consecutive characters with the same character.</p>

<p>For eg: - if my string is "something likeeeee tttthhiiissss" then my final output should be "something like this".</p>

<p>The string can contain special characters too including space.</p>

<p>Can you guys suggest some simple way for doing this.</p>
