自己检索一下吧,很简单的问题
procedure TForm1.FindClick(Sender: TObject);
var
i : Integer;
str1,str2,pathstr : String;
List : TStringList;
begin
str1 := ???; //要被替换的字符串
str2 := ???; //要替换成的字符串
pathstr := ???; //文本文件路径及文件名.
List := TStringList.Create;
List.LoadFromFile( Path );
for Counter := 0 to List.Count - 1 do
list := stringreplace(List,str1,str2,[rfReplaceAll]);
List.SaveToFile( Pathstr );
List.free;
end;