<?php
$input = <<<EOF
МУУ ГООУО ОПП по Удмyртcкой Oбласти объявляет
конкурс на пocтaвку кaнцелярских товаров
на сумму 100500 руб. Sаmple.
EOF ;
"wordChecker" => "/\b[А-ЯЁа-яё]+[A-Za-z]+\w*/u" ,
"symbolChecker" => "/[A-Za-z]/u" ,
) ,
"wordChecker" => "/\b[A-Za-z]+[А-ЯЁа-яё]+\w*/u" ,
"symbolChecker" => "/[А-ЯЁа-яё]/u" ,
) ,
) ;
foreach ( $regexp as $rule ) {
foreach ( $matchWords [ 0 ] as $wrongWord ) {
echo "Опечатка в слове {$wrongWord} : " ;
$wrongWord = preg_replace ( $rule [ 'symbolChecker' ] , '[$0]' , $wrongWord ) ; echo $wrongWord . "\n " ;
}
}
PD9waHAKZXJyb3JfcmVwb3J0aW5nKC0xKTsKCiRpbnB1dCA9IDw8PEVPRgrQnNCj0KMg0JPQntCe0KPQniDQntCf0J8g0L/QviDQo9C00Lx50YDRgmPQutC+0LkgT9Cx0LvQsNGB0YLQuCDQvtCx0YrRj9Cy0LvRj9C10YIK0LrQvtC90LrRg9GA0YEg0L3QsCDQv29j0YJh0LLQutGDINC6YdC90YbQtdC70Y/RgNGB0LrQuNGFINGC0L7QstCw0YDQvtCyCtC90LAg0YHRg9C80LzRgyAxMDA1MDAg0YDRg9CxLiBT0LBtcGxlLgpFT0Y7CgokcmVnZXhwID0gYXJyYXkoCglhcnJheSgKCQkid29yZENoZWNrZXIiID0+ICIvXGJb0JAt0K/QgdCwLdGP0ZFdK1tBLVphLXpdK1x3Ki91IiwKCQkic3ltYm9sQ2hlY2tlciIgPT4gIi9bQS1aYS16XS91IiwKCQkpLAoJYXJyYXkoCgkJIndvcmRDaGVja2VyIiA9PiAiL1xiW0EtWmEtel0rW9CQLdCv0IHQsC3Rj9GRXStcdyovdSIsCgkJInN5bWJvbENoZWNrZXIiID0+ICIvW9CQLdCv0IHQsC3Rj9GRXS91IiwKCQkpLAoJKTsKZm9yZWFjaCgkcmVnZXhwIGFz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