title: PHP regex to replace double or more characters with single character
body: <p>Why the following won't work?</p>
  
  <pre><code>&lt;?php
   $text = 'Hell   looo   w  orlldddddd!!!!!!!!!';
   $sanitized = preg_replace("/(\w|\s)\1{1,}/mi","$1",$text);
   echo $sanitized;
   ?&gt;
  </code></pre>
  
  <p>The output expected should be :
      Hel lo w orld!</p>
  
  <p>Thank you    </p>