Puoi fare cosi.

Codice PHP:
<?php 
$string  
"aer 0,12 ioiodo 9119,98 idido 76 diOISIJ18,65 178,8 9001,123 LLL34";
$pattern "/(\,)\d{2}(\D)/";
$replace "XX";
$result  preg_replace($pattern,"\\1$replace\\2",$string);
print 
'<p style="font-family:\'Courier New\'">';
print 
"Prima&nbsp;: $string<br/>";
print 
"Dopo&nbsp;&nbsp;: $result<br/>";
print 
"</p>";
 
?>

Prima : aer 0,12 ioiodo 9119,98 idido 76 diOISIJ18,65 178,8 9001,123
LLL34
Dopo : aer 0,XX ioiodo 9119,XX idido 76 diOISIJ18,XX 178,8 9001,123
LLL34