I am to remove the spaces between the initials and keep the space between initial and any word.
I would like to get this result. A.J.P. Jane B.V.
Instead I am getting this result A.J. P. Jane B. V.
$string = "A.J. P. Jane B. V.";
$string = preg_replace('/\.\s\[A-z]{1}\./', '.', $string);
echo $string;