Regex php正则表达式preg_替换字符串中的点,但可能的浮点中的点

Regex php正则表达式preg_替换字符串中的点,但可能的浮点中的点,regex,Regex,我需要在句子之间的点后添加空格(如果没有空格),但不要在浮动中更改点 $string = "Some words here. More words, followed by 1.5 and 2.3 here.Here is no space after the dot." 是“这里,这里” 变成了“这里,这里” 尝试了很多,但找不到解决方案。这应该可以 $result = "Some words here. More words, followed by 1.5 and 2.3 here. H

我需要在句子之间的点后添加空格(如果没有空格),但不要在浮动中更改点

$string = "Some words here. More words, followed by 1.5 and 2.3 here.Here is no space after the dot."
是“这里,这里” 变成了“这里,这里”

尝试了很多,但找不到解决方案。

这应该可以

$result = "Some words here. More words, followed by 1.5 and 2.3 here. Here is no space after the dot."
preg_replace('/([a-z]+)\.([^\s])/i', '$1. $2', $string);