我一直在尝试使用:
$string="The Dr. is here!!! I am glad I'm in the U.S.A. for the Dr. quality is great!!!!!!"; preg_match_all('~.*?[?.!]~s',$string,$sentences); print_r($sentences);
但它不适用于Dr.,USA等.
有没有人有更好的建议?
php regex split text-segmentation
php ×1
regex ×1
split ×1
text-segmentation ×1