a id="ctl00_CenterRegion_ctl00_ctl00_TextList_ctl04_IconUrl" href="http://www.xxx.xxx/6271009.rar" target="_blank">
##################################################
<a id="ctl00_CenterRegion_ctl00_ctl00_TextList_ctl19_IconUrl" href="http://www.xxx.xxx/6270904.rar" target="_blank">
##################################################
<a id="ctl00_CenterRegion_ctl00_ctl00_TextList_ctl23_IconUrl" href="http://www.xxx.xxx/6271009.rar" target="_blank">
##################################################
<a id="ctl00_CenterRegion_ctl00_ctl00_TextList_ctl71_IconUrl" href="http://www.xxx.xxx/6270912.rar" target="_blank">
##################################################
如何将里面的HTTP://XXXX.RAR 提取到MEMO中? 主要是循环我不会写....
function CenterStr(Src:String;Before,After:String):String;
var
Pos1,Pos2:WORD;
begin
Pos1:=Pos(Before,Src)+Length(Before);
Pos2:=Pos(After,Src);
Result:=Copy(Src,Pos1,Pos2-Pos1);
end; Const
A ='IconUrl" href="';
B ='" target="_blank">'; memo.Lines.Add(CenterStr(str,A,B)); 这样只能提取出第一个URL来(http://www.xxx.xxx/6271009.rar) 如何写循环啊...头晕啊.... 小弟菜鸟.....希望大虾别笑话我...
##################################################
<a id="ctl00_CenterRegion_ctl00_ctl00_TextList_ctl19_IconUrl" href="http://www.xxx.xxx/6270904.rar" target="_blank">
##################################################
<a id="ctl00_CenterRegion_ctl00_ctl00_TextList_ctl23_IconUrl" href="http://www.xxx.xxx/6271009.rar" target="_blank">
##################################################
<a id="ctl00_CenterRegion_ctl00_ctl00_TextList_ctl71_IconUrl" href="http://www.xxx.xxx/6270912.rar" target="_blank">
##################################################
如何将里面的HTTP://XXXX.RAR 提取到MEMO中? 主要是循环我不会写....
function CenterStr(Src:String;Before,After:String):String;
var
Pos1,Pos2:WORD;
begin
Pos1:=Pos(Before,Src)+Length(Before);
Pos2:=Pos(After,Src);
Result:=Copy(Src,Pos1,Pos2-Pos1);
end; Const
A ='IconUrl" href="';
B ='" target="_blank">'; memo.Lines.Add(CenterStr(str,A,B)); 这样只能提取出第一个URL来(http://www.xxx.xxx/6271009.rar) 如何写循环啊...头晕啊.... 小弟菜鸟.....希望大虾别笑话我...
解决方案 »
- 图片如何合并?(急)
- cxgrid 中选中一列的某记录,当焦点离开这个cxgrid后,如何使原来选中的记录变色显示?
- 哪位有用Indy实现局域网聊天的源码?
- 用FastReport动态生成报表时,如何设置TfrMemoView的Parent?
- 请高手帮忙!
- 在同一个工程里面,远程数据模块能不能有很多个?焦急地问,感谢万分,绝对高分!
- d5+listview的CustomDrawItem中系统资源为什么不能释放?
- 用過Dev Express控件的請幫忙﹐如何動態邦定dxDBGrid來顯示數據﹖
- {}中的内容在delphi中起着什么作用?
- Delphi的文件操作
- 请教一下,winexec()函数调用的命令行可否使用变量?
- ExpressQuantumGrid如何显示某目录JPG文件
var
Pos1,Pos2:WORD;
begin
Pos1:=Pos(Before,Src)+Length(Before);
Pos2:=Pos(After,Src);
Result:=Copy(Src,Pos1,Pos2-Pos1);
end;procedure TForm1.InsertMemo(Src,Before,After:String);
var
Str1:string;
begin
Str1 := Src;
while ((Pos(Before,Str1)+Length(Before)) <> 0) and (Pos(after,Str1) <> 0)do
begin
memo1.Lines.Add(CenterStr(Str1,Before,After));
Str1 := Copy(Str1,Pos(after,Str1)+Length(after),length(Str1)-(Pos(after,Str1)+Length(after))+1)
end;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
InsertMemo('a123b123123a123123b123123a212342b','a','b');
end;
A ='IconUrl" href="';
B ='" target="_blank">';
procedure TForm1.Button1Click(Sender: TObject);
begin
InsertMemo(str,A,B);
end;