How about a variation on this:

procedure TForm1.Button1Click(Sender: TObject);
var
 BadStuff: string;
 InText: TStringList;
begin
  InText := TStringList.Create;
  try
    InText.LoadFromFile( '... input file ... ');

    BadStuff := 
chr(10)+chr(13)+chr(10)+chr(13)+chr(10)+chr(13)+chr(10)+chr(13);
    InText.Text := StringReplace(InText.Text,BadStuff,'',[rfReplaceAll]);

    InText.SaveToFile( ' ... new file ... ');
  finally
    InText.Free;
  end;
end;

You might need to checek the order in which the CR and LF chars are put 
in by your external program.  Also you might find that using a memo 
control is quite slow compared to using a TStringList, unless you need 
to be able to see the text on the screen.

Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to