currently i am using php preg_replace to replace certain portion of string
12854827.12854827_IDS.0 12854827.12854827_892.0
12854827.12854827_IDS.0 12854827.12854827_892.0
here i required output is
12854827.IDS.0 12854827.892.0
12854827.IDS.0 12854827.892.0
but preg_replace produced output
12854827.892.0
12854827.892.0
php code that i used given below
preg_replace('/\..*_/', '.', $A)
how i solve above problem ? & how i replace nearest matching word using php preg_replace ?