<?php
$text = 'Игрoк под имменем Nаttpyrе являетcя самым МОЩНЫM игроком в миpе, подтвеpждено знаком качества EA GAMЕS.' ;
$regexp = '/[a-zA-Z]/' ;
$regexpEng = '/([^а-яА-Я][a-zA-Z]+[а-я-А-Я]+[a-zA-Zа-яА-Я]*)/ui' ;
$regexpRus = '/[а-яА-Я]/ui' ;
$regexpWord = '/([^a-zA-Z][а-яА-Я]+[a-zA-Z]+[a-zA-Zа-яА-Я]*)|([^а-яА-Я][a-zA-Z]+[а-я-А-Я]+[a-zA-Zа-яА-Я]*)/ui' ;
$engSymbols = array ( 'a' , 'A' , 'B' , 'c' , 'C' , 'e' , 'E' , 'H' , 'k' , 'K' , 'M' , 'o' , 'O' , 'p' , 'P' , 'T' , 'x' , 'X' , 'y' ) ; $rusSymbols = array ( 'а' , 'А' , 'В' , 'с' , 'С' , 'е' , 'Е' , 'Н' , 'к' , 'К' , 'М' , 'о' , 'О' , 'р' , 'Р' , 'Т' , 'х' , 'Х' , 'у' ) ; $i = 0 ;
foreach ( $error [ 0 ] as $word ) {
$errorsFix [ $i ] = str_replace ( $rusSymbols , $engSymbols , $word ) ; $i ++;
} else {
$errorsFix [ $i ] = str_replace ( $engSymbols , $rusSymbols , $word ) ; $i ++;
}
echo "Ошибка в слове {$word} : {$result} \n " ;
}
echo "\n Текст исправлен и теперь выглядит так: \n \n $textFix " ;
} else {
echo 'Ошибок не найдено' ;
}
?>
PD9waHAKCmVycm9yX3JlcG9ydGluZygtMSk7CgokdGV4dCA9ICfQmNCz0YBv0Log0L/QvtC0INC40LzQvNC10L3QtdC8IE7QsHR0cHly0LUg0Y/QstC70Y/QtdGCY9GPINGB0LDQvNGL0Lwg0JzQntCp0J3Qq00g0LjQs9GA0L7QutC+0Lwg0LIg0LzQuHDQtSwg0L/QvtC00YLQstC1cNC20LTQtdC90L4g0LfQvdCw0LrQvtC8INC60LDRh9C10YHRgtCy0LAgRUEgR0FN0JVTLic7CiRyZWdleHAgPSAnL1thLXpBLVpd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