<?php
$wrongText = "Сегодня,вечером я на кухне пил чай с координально симпатичной тян. Она сидела сдесь,на стуле, котрый зделал я, обняв ножки в полосатых носках руками и смотрела на меня тепло-тепло,но шыпела." ;
$correctText = "Сегодня вечером я на кухне пил чай с симпатичной тян. Она сидела на стуле, обняв ножки в полосатых носках руками и смотрела на меня тепло-тепло и слушала." ;
$regexp = '/(,[^ ])(|;[^ ])|(![^ ])|([?][^ ])|(:[^ ])|(жы)|(шы)|(координально)|(сдесь)|(зделал)|(зделаю)|(зделан)|(зделалось)|(,а)|(,но)/ui' ;
{ echo "Найдены следущие ошибки в тексте:\n " ;
//$parts = preg_split($regexp, $text, 0, PREG_SPLIT_NO_EMPTY);
else
{ echo "В тексте все правильно" ;
}
// your code goes here
PD9waHAKIAplcnJvcl9yZXBvcnRpbmcoLTEpOwogCiR3cm9uZ1RleHQgPSAi0KHQtdCz0L7QtNC90Y8s0LLQtdGH0LXRgNC+0Lwg0Y8g0L3QsCDQutGD0YXQvdC1INC/0LjQuyDRh9Cw0Lkg0YEg0LrQvtC+0YDQtNC40L3QsNC70YzQvdC+INGB0LjQvNC/0LDRgtC40YfQvdC+0Lkg0YLRj9C9LiDQntC90LAg0YHQuNC00LXQu9CwINGB0LTQtdGB0Yws0L3QsCDRgdGC0YPQu9C1LCDQutC+0YLRgNGL0Lkg0LfQtNC10LvQsNC7INGPLCDQvtCx0L3Rj9CyINC90L7QttC60Lgg0LIg0L/QvtC70L7RgdCw0YLRi9GFINC90L7RgdC60LDRhSDRgNGD0LrQsNC80Lgg0Lgg0YHQvNC+0YLRgNC10LvQsCDQvdCwINC80LXQvdGPINGC0LXQv9C70L4t0YLQtdC/0LvQvizQvdC+INGI0YvQv9C10LvQsC4iOwokY29ycmVjdFRleHQgPSAi0KHQtdCz0L7QtNC90Y8g0LLQtdGH0LXRgNC+0Lwg0Y8g0L3QsCDQutGD0YXQvdC1INC/0LjQuyDRh9Cw0Lkg0YEg0YHQuNC80L/QsNGC0LjRh9C90L7QuSDRgtGP0L0uINCe0L3QsCDRgdC40LTQtdC70LAg0L3QsCDRgdGC0YPQu9C1LCDQvtCx0L3Rj9CyINC90L7QttC60Lgg0LIg0L/QvtC70L7RgdCw0YLRi9GFINC90L7RgdC60LDRhSDRgNGD0LrQsNC80Lgg0Lgg0YHQvNC+0YLRgNC10LvQsCDQvdCwINC80LXQvdGPINGC0LXQv9C70L4t0YLQtdC/0LvQviDQuCDRgdC70YPRiNCw0LvQsC4iOwokbWlzdGFrZXMgPSBhcnJheSgpOyAKIAokcmVnZXhwID0gJy8oLFteIF0pKHw7W14gXSl8KCFbXiBdKXwoWz9dW14gXSl8KDpbXiBdKXwo0LbRiyl8KNGI0YspfCjQutC+0L7RgNC00LjQvdCw0LvRjNC90L4pfCjRgdC00LXRgdGMKXwo0LfQtNC10LvQsNC7KXwo0LfQtNC10LvQsNGOKXwo0LfQtNC10LvQsNC9KXwo0LfQtNC10LvQsNC70L7RgdGMKXwoLNCwKXwoLNC90L4pL3VpJzsKaWYgKHByZWdfbWF0Y2hfYWxsKCRyZWdleHAsICR3cm9uZ1RleHQsICRtaXN0YWtlcykpIAogICAge2VjaG8gItCd0LDQudC00LXQvdGLINGB0LvQtdC00YPRidC40LUg0L7RiNC40LHQutC4INCyINGC0LXQutGB0YLQtTpcbiI7CgkvLyRwYXJ0cyA9IHByZWdfc3BsaXQoJHJlZ2V4cCwgJHRleHQsIDAsIFBSRUdfU1BMSVRfTk9fRU1QVFkpOwoJdmFyX2R1bXAoJG1pc3Rha2VzKTt9CmVsc2UgCiAgICB7ZWNobyAi0JIg0YLQtdC60YHRgtC1INCy0YHQtSDQv9GA0LDQstC40LvRjNC90L4iOwogICAgfQovLyB5b3VyIGNvZGUgZ29lcyBoZXJl
stdout
Найдены следущие ошибки в тексте:
array(16) {
[0]=>
array(7) {
[0]=>
string(3) ",в"
[1]=>
string(24) "координально"
[2]=>
string(10) "сдесь"
[3]=>
string(3) ",н"
[4]=>
string(12) "зделал"
[5]=>
string(3) ",н"
[6]=>
string(4) "шы"
}
[1]=>
array(7) {
[0]=>
string(3) ",в"
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(3) ",н"
[4]=>
string(0) ""
[5]=>
string(3) ",н"
[6]=>
string(0) ""
}
[2]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[3]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[4]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[5]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[6]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[7]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(4) "шы"
}
[8]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(24) "координально"
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[9]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(10) "сдесь"
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[10]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(12) "зделал"
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[11]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[12]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[13]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[14]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
[15]=>
array(7) {
[0]=>
string(0) ""
[1]=>
string(0) ""
[2]=>
string(0) ""
[3]=>
string(0) ""
[4]=>
string(0) ""
[5]=>
string(0) ""
[6]=>
string(0) ""
}
}