Using sed to search and replace data

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.

% echo "BGM+UNIV:1+CTRLSRGF-ARIV+STS+110327:1701+20110327170022'UNH.....'BGM+UNIV:4+EZHPIP:ZZZ+APL:ZZZ+110207:0430+20110207043010'UNH.." \
| sed  "s/\(:[0-9]\{4\}+\)[0-9]\{8\}/\1'''''''''/g"
BGM+UNIV:1+CTRLSRGF-ARIV+STS+110327:1701+'''''''''170022'UNH.....'BGM+UNIV:4+EZHPIP:ZZZ+APL:ZZZ+110207:0430+'''''''''043010'UNH..
% echo "....'KMV+123:123456789:203'DKCSGSIN:139:6+TER.....'KMV+1:123456789:204'....." \
| sed "s/\(KMV+[^:]*:\)[0-9]\{9\}/\1'''''''''/g"
....'KMV+123:''''''''':203'DKCSGSIN:139:6+TER.....'KMV+1:''''''''':204'.....

Can you explain what is meant by

sed  "s/\(:[0-9]\{4\}+\)[0-9]\{8\}/\1'''''''''/g

?
Thanks.

Sorry my English is not very good. But there are a lot of good tutorials about regular expressions in the Internet.