Dear Stata experts,

I want to replace all string values starting with 'QC_6200945' of the variable SampleID with only QC_6200945 (i.e. keeping only QC_6200945 in the name). The data looks like this:

SampleID
QC_6200945+_c_31
QC_6200945+_c_32
QC_6200945+_c_33
QC_6200945+_c_34
etc.

I have Stata 15.

Thank you in advance.