<?php
$text = "Какой же ты д у Р а К";
$regexp = "/д(у|\\s){1,2}(р|\\s){1,2}(а|\\s){1,2}(к|\\s]){1,2}/iUu";
$replacement = preg_replace($regexp,'Хороший человек', $text); echo $replacement;
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKbWJfaW50ZXJuYWxfZW5jb2RpbmcoJ3V0Zi04Jyk7CgokdGV4dCA9ICLQmtCw0LrQvtC5INC20LUg0YLRiyDQtCDRgyDQoCDQsCDQmiI7CiRyZWdleHAgPSAiL9C0KNGDfFxccyl7MSwyfSjRgHxcXHMpezEsMn0o0LB8XFxzKXsxLDJ9KNC6fFxcc10pezEsMn0vaVV1IjsKJHJlcGxhY2VtZW50ID0gcHJlZ19yZXBsYWNlKCRyZWdleHAsJ9Cl0L7RgNC+0YjQuNC5INGH0LXQu9C+0LLQtdC6JywgJHRleHQpOwplY2hvICRyZXBsYWNlbWVudDs=