Cita:
Empezado por JXJ
en un archivo de texto tengo que encontrar
el texto contenido entre las lineas
descripcion:
categoria:
|
Hola.
Coincido con ElDioni y AzidRain. Ateniendome al texto de tu post, esto hace lo que estas pidiendo...
Código Delphi
[-]
function EntreDescripcionYCategoria(NomArch: string): TStrings;
var
i,p: Integer;
ts: TStrings;
begin
ts:= TStringList.Create;
ts.LoadFromFile(NomArch);
for i:= 0 to ts.Count -1 do
begin
p:= Pos(':', ts[i]);
if p > 0 then
ts[i]:= Copy(ts[i], p + 1, Length(ts[i]));
end;
Result:= ts;
end;
Llamada ej.:
Código Delphi
[-]
Memo1.Lines:= EntreDescripcionYCategoria('C:\TEXTO.TXT');
Saludos.