<?php
$text = "Привет,шыр!труд:жыр?пассажыр;зделаю Координально но сдесь решена проблема ушыбов.\
Зделано многое а ведь это зделал я";
$regex['space'] = '/[,;!?:][^,;!?:\\s]+/u';//проверка на пробелы
$regex['zhsh'] = '/[а-яА-Я]*(?:ж|ш)ы[а-яА-Я]*/u';//жи ши
$regex['orpho'] = '/координально|сдесь|з(?:делал|делаю|делан)[\\S]*/ui';//орфография
$regex['punctum'] = '/[а-яА-Я]*[^,]\\s(?:а|но)\\s/u';//пунктуация
foreach ($regex as $rule => $pattern){
$message = '';
switch ($rule){
case 'space':
$message = 'отсутствие пробелов';
break;
case 'zhsh':
$message = 'написание жи-ши';
break;
case 'orpho':
$message = 'орфографические';
break;
case 'punctum':
$message = 'пунктуация';
break;
}
echo "Нашлись ошибки ({$message}) {$count} шт :\n";
foreach ($matches[0] as $mistake){
echo "{$mistake}\t";
};
echo "\n";
} else {
echo "Ошибки ({$message}) отсутствуют\n";
}
}
PD9waHAKCiR0ZXh0ID0gItCf0YDQuNCy0LXRgizRiNGL0YAh0YLRgNGD0LQ60LbRi9GAP9C/0LDRgdGB0LDQttGL0YA70LfQtNC10LvQsNGOINCa0L7QvtGA0LTQuNC90LDQu9GM0L3QviDQvdC+INGB0LTQtdGB0Ywg0YDQtdGI0LXQvdCwINC/0YDQvtCx0LvQtdC80LAg0YPRiNGL0LHQvtCyLlwKCQnQl9C00LXQu9Cw0L3QviDQvNC90L7Qs9C+0LUg0LAg0LLQtdC00Ywg0Y3RgtC+INC30LTQtdC70LDQuyDRjyI7CgokcmVnZXhbJ3NwYWNlJ10gPSAnL1ssOyE/Ol1bXiw7IT86XFxzXSsvdSc7Ly/Qv9GA0L7QstC10YDQutCwINC90LAg0L/RgNC+0LHQtdC70YsKJHJlZ2V4Wyd6aHNoJ10gPSAnL1vQsC3Rj9CQLdCvXSooPzrQtnzRiCnRi1vQsC3Rj9CQLdCvXSovdSc7Ly/QttC4INGI0LgKJHJlZ2V4WydvcnBobyddID0gJy/QutC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