<?php
$text =  'ты - д у Р aк. Ааааа.';
$regExp = '/\b([\s]*[дураaк]){5}\b/ui';
if (preg_match($regExp, $text)) {
	$result = preg_replace($regExp, 'няша', $text);
	echo $result;
}