RsD0p9BK
6/2/2014 - 10:53 AM

small_word.php

// удалить слова, короче 2 символов
$pattern = "/\b[^-]{1,2}\b/iu";
$text = preg_replace($pattern, ' ', $text);

// http://stackoverflow.com/questions/13639675/php-remove-small-words-from-string-ignoring-german-characters-in-the-words