I have this simple pattern that splits a text into periods:
$text = preg_split("/[\.:!\?]+/", $text);
But I want to include . :
or !
at the end of the array items.
That is, now for "good:news.everyone!" I have:
array("good", "news", "everyone", "");
But I want:
array("good:", "news.", "everyone!", "");