I want to remove spaces from strings where the space is preceeded by a digit or a "." and acceded by a digit or ".". I have strings like: "50 .10", "50 . 10", "50. 10" and I want them all to become "50.10" but with an unknown number of digits on either side. I'm trying with lookahead/lookbehind assertions like this:
$row = str_replace("/(?<=[0-9]+$)\s*[.]\s*(?=[0-9]+$)/", "", $row);
But it does not work...