A la rapida escribi este codigo, prueba y me cuentas...
Código Delphi
[-]
procedure TForm1.Button1Click(Sender: TObject);
Function GetCodigo(AText:String; ASep:Char):string;
var
j:Integer;
List:TStrings;
begin
List:=TStringList.Create;
List.Clear;
List.Delimiter :=ASep;
List.DelimitedText:=ReplaceStr( AText,' ','');
Result:='';
for j := 0 to List.Count - 1 do
begin
if Length(List[j])<3 then
Result:=Result+List[j]
else
Result:=Result+Copy(List[j],1,3);
end;
Result:=UpperCase(Result);
List.Free;
end;
begin
ShowMessage( GetCodigo('COCA COLA/LIGHT /BOTELLA/PLASTICA / Lts / 2.5', '/') );
end;
Saludos cordiales