如何提取诸如'.v/ww9898/15JAN/CAN/中间例如'15JAN'字符其中ww9898可能为ww98989长度不定〔在线等)! 如何提取诸如'.v/ww9898/15JAN/CAN/中间例如'15JAN'字符其中ww9898可能为ww98989长度不定〔在线等)! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var FileList,LineList: TStrings;begin FileList:=TStringList.Create; LineList:=TStringList.Create; try FileList.LoadFromFile('d:\test.txt'); //文件的所有内容都保存在FileList中了 //FileList.Strings[0]是第一行 //FileList.Strings[1]是第二行... //FileList.Count是行数 Memo1.Lines:=FileList; //显示FileList中的内容 //将FileList的第一行根据空格拆分,保存在LineList中 if ExtractStrings([' '],[],PChar(FileList.Strings[0]),LineList)>0 then Memo1.Lines.AddStrings(LineList); //添加到Memo1的后面 finally FileList.Free; LineList.Free; end;end; 棋牌客户端 左侧游戏列表的选择问题 类名 SysTreeView32 【ivorytower】男人越成熟越有魅力! 窗体继承的问题 Very easy 的问题 我輿沒有溫柔的女孩接吻了.......... 急问,如何获得应用程序自身所在的目录呢? 请问如何创建只有输入密码后才能停止的系统服务? 关于用户登录的问题? 来吧,写万能打印的同行,让我看看你的代码。 kxy,xyk,ykx,kyx请进 一个有关数据保存的问题 如何定位每个网址?请教高手。如何定位它?
FileList,LineList: TStrings;
begin
FileList:=TStringList.Create;
LineList:=TStringList.Create;
try
FileList.LoadFromFile('d:\test.txt');
//文件的所有内容都保存在FileList中了
//FileList.Strings[0]是第一行
//FileList.Strings[1]是第二行...
//FileList.Count是行数
Memo1.Lines:=FileList; //显示FileList中的内容
//将FileList的第一行根据空格拆分,保存在LineList中
if ExtractStrings([' '],[],PChar(FileList.Strings[0]),LineList)>0 then
Memo1.Lines.AddStrings(LineList); //添加到Memo1的后面
finally
FileList.Free;
LineList.Free;
end;
end;