Hi,
Kindly need your expertise in this problem.
I have to search and replace data. The problem is, the data is in the same format but slightly different content. What I need is sed commands that can work for those "slightly different content".
input:
BGM+UNIV:1+CTRLSRGF-ARIV+STS+110327:1701+20110327170022'UNH.....'BGM+UNIV:4+EZHPIP:ZZZ+APL:ZZZ+110207:0430+20110207043010'UNH..
and
....'KMV+123:123456789:203'DKCSGSIN:139:6+TER.....'KMV+1:123456789:204'.....
output:
BGM+UNIV:1+CTRLSRGF-ARIV+STS+110327:1701+''''''''170022'UNH.....'BGM+UNIV:4+EZHPIP:ZZZ+APL:ZZZ+110207:0430+''''''''043010'UNH..
and
....'KMV+123:''''''''':203'DKCSGSIN:139:6+TER.....'KMV+1:''''''''':204'.....
Regardless of "'KMV+123:" or "'KMV+1:"(there might be others like "'KMV+25", "'KMV+7'"...), 123456789 will be replaced with '''''''''
Also, regardless of "BGM+UNIV:1+CTRLSRGF-ARIV+STS+110327:1701+20110327170022'" or "'BGM+UNIV:4+EZHPIP:ZZZ+APL:ZZZ+110207:0430+20110207043010'", the text in blue will be replaced.
Thanks for any idead.