fork(1) download
  1. <?php
  2. $text = 'ты - д у Р aк';
  3. $regExp = '/\b([\s]*[дураaк]){5}\b/ui';
  4. if (preg_match($regExp, $text)) {
  5. $result = preg_replace($regExp, 'няша', $text);
  6. echo $result;
  7. }
Success #stdin #stdout 0.02s 52480KB
stdin
Standard input is empty
stdout
ты - няша