<?php
$string = 'Lorem ipsum dolor. Consetetur elitr 2.000 BC sed diam nonumy 300.';
$pattern = "~\d+\K\.(?=\d+)~";
$replacement = "";
?>
PD9waHAKJHN0cmluZyA9ICdMb3JlbSBpcHN1bSBkb2xvci4gQ29uc2V0ZXR1ciBlbGl0ciAyLjAwMCBCQyBzZWQgZGlhbSBub251bXkgMzAwLic7CiRwYXR0ZXJuID0gIn5cZCtcS1wuKD89XGQrKX4iOwokcmVwbGFjZW1lbnQgPSAiIjsKZWNobyBwcmVnX3JlcGxhY2UoJHBhdHRlcm4sICRyZXBsYWNlbWVudCwgJHN0cmluZyk7Cj8+