文本文件删除特定字符 比如文本文件内容1111111111111 abc 111aaaaaaaaaaaaaaaaaaaaa2222222222222 abc 222删除abc并保存 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 小的文本文件,采用下面的试试。。procedure TForm1.Button1Click(Sender: TObject); //写入到新文件var strlist:Tstringlist; str:string;begin strlist:=Tstringlist.Create; try strlist.LoadFromFile('c:\123.txt'); str:=strlist.Text; str:=StringReplace(str,'abc','',[rfReplaceAll]); strlist.Text:=str; strlist.SaveToFile('c:\123.txt'); finally strlist.Free; end;end; 简单的直接用delphi自带的就可以了,复杂点的可以用正则来处理 怎样用fastreport嵌套打印数据? 如何让程序只能由其他程序运行 sql+delphi的简单问题 2个简单的问题 头痛! 头痛! 进来看看我的机子不知道为什么就不能装winxp,win2000了只能装win98,why???? fastreport如何设置? 请高手解答 谁有fastreport的电子图书可供下载? 关于delphi中的htonl和VC++中的htonl返回值的困惑! 简单问题,请侃侃,关于web ,html 错误exception eaccessviolation in module p_train.exe at 000848d1是由什么引起的? 各位大哥救命啊
var
strlist:Tstringlist;
str:string;begin
strlist:=Tstringlist.Create;
try
strlist.LoadFromFile('c:\123.txt');
str:=strlist.Text;
str:=StringReplace(str,'abc','',[rfReplaceAll]);
strlist.Text:=str;
strlist.SaveToFile('c:\123.txt');
finally
strlist.Free;
end;
end;