<?php
$input = <<<EOF
МУУ ГООУО ОПП по Удмyртской Области объявляет
конкурс на пocтaвку кaнцелярских товаров
на сумму 100500 руб. Sаmple.
EOF ;
"wordChecker" => "/\b(([А-ЯЁа-яё]+)([AaBCcEeHKMOoPpTy]+))+([А-ЯЁа-яё]*)/u" ,
"symbolChecker" => "/(([А-ЯЁа-яё]+)([AaBCcEeHKMOoPpTy]+))/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/QviDQo9C00Lx50YDRgtGB0LrQvtC5INCe0LHQu9Cw0YHRgtC4INC+0LHRitGP0LLQu9GP0LXRggrQutC+0L3QutGD0YDRgSDQvdCwINC/b2PRgmHQstC60YMg0Lph0L3RhtC10LvRj9GA0YHQutC40YUg0YLQvtCy0LDRgNC+0LIK0L3QsCDRgdGD0LzQvNGDIDEwMDUwMCDRgNGD0LEuIFPQsG1wbGUuCkVPRjsKCiRyZWdleHAgPSBhcnJheSgKCWFycmF5KAoJCSJ3b3JkQ2hlY2tlciIgPT4gIi9cYigoW9CQLdCv0IHQsC3Rj9GRXSspKFtBYUJDY0VlSEtNT29QcFR5XSspKSsoW9CQLdCv0IHQsC3Rj9GRXSopL3UiLAoJCSJz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