PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $str = "Здравствуйте!!!!! Убиррррcccccc-- baac..."; echo "<pre>"; echo $str, "".PHP_EOL; echo preg_replace('/(.)\1+/u', '$1', $str); echo "</pre>".PHP_EOL; $t= preg_replace('#(\.|\?|!|\(|\)\-){2,}#', '\1', $str); echo $t;
Show:  
Copy Clear