参考jsxjd的提示,可以这样作,试试看:<br>var<br> s:TStrings;<br> N,i:integer;<br>begin<br> s:=TStringList.create;<br> s.LoadFromFile('.....');<br> //<br> for i:=0 to s.count-1 do<br> begin<br> if pos('mybox',s)>0 then<br> stringreplace(s,'mybox','myboxAAA',[rfReplaceAll, rfIgnoreCase]);<br> end;<br> // <br> s.SaveToFile(.......);<br> s.Free;<br>end;<br>