I tried to use:
$string="The Dr. is here!!! I am glad I'm in the USA for the Dr. quality is great!!!!!!"; preg_match_all('~.*?[?.!]~s',$string,$sentences); print_r($sentences);
But this does not work for Dr., USA, etc.
Does anyone have any better suggestions?
split php regex text-segmentation
Scott tyler
source share