// удалить слова, короче 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