It all depens if it's know location than array access is fine. If it's known string gsub etc will be ok, othewiese one will have to use regular expressions.
In you case you know it' DEC you like to remove and the c: so this will do and it's after the c: so
str[5,str,size]
irb(main):005:0> str[5,str.size]
=> "_xyz"
will do fine. if the DEC is in between you have to use gsub
"c:abcDEC_foobarz"
=> "c:abcDEC_foobarz"
irb(main):007:0> str[2,str.size].gsub("DEC", "")
=> "abc_foobarz"
There is not general answer, it depends on the data you have...
Regards
Friedrich