<?php
$input = <<<EOF
МУУ ГООУО ОПП по (Удмyртckой - латинские буквы в слове) Области объявляет
конкурс на пocтaвку кaнцелярских товаров
на сумму 100500 руб. Sаmple.
EOF;
"wordChecker" => "/\b(([А-ЯЁа-яё]+)([AaBCcEeHKMOoPpT]+))+([А-ЯЁа-яё]*)/u",
"symbolChecker" => "/(([А-ЯЁа-яё]+)([AaBCcEeHKMOoPpT]+))/u",
),
"wordChecker" => "/\b(([A-Za-z]+)([АаВСсЕеНКМОоРрТ]+))+([A-Za-z]*)/u",
"symbolChecker" => "/(([A-Za-z]+)([АаВСсЕеНКМОоРрТ]+))/u",
),
);
foreach($regexp as $rule){
foreach($matchWord[0] as $index => $wrongWord){
echo "Опечатка в слове {$wrongWord}: ";
$wrongWord = "";
foreach($matchSymbol[0] as $keyIndex => $key){
$wrongWord .= $matchSymbol[2][$keyIndex]."[".$matchSymbol[3][$keyIndex]."]";
}
echo $wrongWord.$matchWord[4][$index]."\n";
}
}
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKCiRpbnB1dCA9IDw8PEVPRgrQnNCj0KMg0JPQntCe0KPQniDQntCf0J8g0L/QviAo0KPQtNC8edGA0YJja9C+0LkgLSDQu9Cw0YLQuNC90YHQutC40LUg0LHRg9C60LLRiyDQsiDRgdC70L7QstC1KSDQntCx0LvQsNGB0YLQuCDQvtCx0YrRj9Cy0LvRj9C10YIK0LrQvtC90LrRg9GA0YEg0L3QsCDQv29j0YJh0LLQutGDINC6YdC90YbQtdC70Y/RgNGB0LrQuNGFINGC0L7QstCw0YDQvtCyCtC90LAg0YHRg9C80LzRgyAxMDA1MDAg0YDRg9CxLiBT0LBtcGxlLgpFT0Y7CgokcmVnZXhwID0gYXJyYXkoCglhcnJheSgKCQkid29yZENoZWNrZXIiID0+ICIvXGIoKFvQkC3Qr9CB0LAt0Y/RkV0rKShbQWFCQ2NFZUhLTU9vUHBUXSspKSsoW9CQLdCv0IHQsC3Rj9GRXSopL3UiLAoJCSJzeW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