<?php
$text = "Жыть сдесь хорошо,но жить вобще прекрасно!";
$regexp = '/жы|сдесь|,[а-я]|вобще/u';
//$mistakes = preg_match_all($regexp, $lowerCase, $mistakes);
echo("Grammatically incorrect!\n");
foreach ($mistakes as $keys => $value) {
foreach ($value as $number => $mistake) {
echo "Найденная ошибка: {$mistake}\n";
}
}
} else {
echo("Absolutely correct!");
}
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgokdGV4dCA9ICLQltGL0YLRjCDRgdC00LXRgdGMINGF0L7RgNC+0YjQvizQvdC+INC20LjRgtGMINCy0L7QsdGJ0LUg0L/RgNC10LrRgNCw0YHQvdC+ISI7CiRyZWdleHAgPSAnL9C20Yt80YHQtNC10YHRjHwsW9CwLdGPXXzQstC+0LHRidC1L3UnOwokbWlzdGFrZXMgPSBhcnJheSgpOwokbG93ZXJDYXNlID0gbWJfc3RydG9sb3dlcigkdGV4dCk7Ci8vJG1pc3Rha2VzID0gcHJlZ19tYXRjaF9hbGwoJHJlZ2V4cCwgJGxvd2VyQ2FzZSwgJG1pc3Rha2VzKTsKCmlmIChwcmVnX21hdGNoX2FsbCgkcmVnZXhwLCAkbG93ZXJDYXNlLCAkbWlzdGFrZXMpKSB7CgllY2hvKCJHcmFtbWF0aWNhbGx5IGluY29ycmVjdCFcbiIpOwoJZm9yZWFjaCAoJG1pc3Rha2VzIGFzICRrZXlzID0+ICR2YWx1ZSkgewoJCWZvcmVhY2ggKCR2YWx1ZSBhcyAkbnVtYmVyID0+ICRtaXN0YWtlKSB7CgkJZWNobyAi0J3QsNC50LTQtdC90L3QsNGPINC+0YjQuNCx0LrQsDogeyRtaXN0YWtlfVxuIjsKCQl9Cgl9Cgp9IGVsc2UgewoJZWNobygiQWJzb2x1dGVseSBjb3JyZWN0ISIpOwp9