Menu
I`m using this to prevent long single words in string:
[CODE]while (preg_match(‘/[^s.!?,;:'”]{31,}/’,$message)) {
$message = preg_replace(‘/(?<=^|[ ‘”])([^s.!?,;:'”]{30})([^s.!?,;:'”]+)/’,’1 2′,$message);
}
but it doesn`t work for punctuation only. Can I add something to include the punctuation as well?