<iframe src="https://vk.com/video_ext.php?oid=-80277030&id=456243576&hash=a19d2b97659986e7" class="test"></iframe>
<iframe src='https://vk.com/video_ext.php?oid=-80277030&id=456243576&hash=a19d2b97659986e7' allowfullscreen='test'></iframe>
<iframe src=https://vk.com/video_ext.php?oid=-80277030&id=456243576&hash=a19d2b97659986e7 frameborder=test></iframe>
function escapeDuplicateWords($text)
{
// удаляем пробелы до/после строки
$text = trim($text);
// удаляем лишние пробелы внутри строки
$text = preg_replace('/\s\s+/', ' ', $text);
// повторяющиеся символы
$text = preg_replace('~(.)\1{2,}~ui', '\\1', $text);
// добавление проблема после .,
$text = preg_replace("#(\S\.|\S,)(\S)#i","$1 $2",$text);
// повторение слов
$text = preg_replace('/(\b\w+\b\s)(?=.?\1)/siu', '', $text);
return $text;
}
$str = 'Всем привет!!!! Кааааак дела????!!! :small: :small: :small::small:';
print escapeDuplicateWords($str);
// Всем привет! Как дела?! :small: :small: :small::small: