fork download
  1. <?php
  2.  
  3. $str = "The The the Hello Truck Hello The the Fantastic bear";
  4. $replacement = "$1";
  5. print preg_replace(/\b([\w'-]+)(\s+\\1)+/i, $replacement, $string);
  6.  
  7. ?>
Runtime error #stdin #stdout 0.02s 13664KB
stdin
Standard input is empty
stdout
Parse error: syntax error, unexpected '/', expecting ')' in /home/LxQW59/prog.php on line 5