为什么以下不起作用?
<?php
$text = 'Hell looo w orlldddddd!!!!!!!!!';
$sanitized = preg_replace("/(\w|\s)\1{1,}/mi","$1",$text);
echo $sanitized;
?>
预期的输出应该是:你好!
谢谢
为什么以下不起作用?
<?php
$text = 'Hell looo w orlldddddd!!!!!!!!!';
$sanitized = preg_replace("/(\w|\s)\1{1,}/mi","$1",$text);
echo $sanitized;
?>
预期的输出应该是:你好!
谢谢