正则表达式出错 ( 积分: 50 )

M

machcat

Unregistered / Unconfirmed
GUEST, unregistred user!
从网页源文件中提取字符串放入response中,再从response.DataString中读取特定字符,运行到*号那一行出错,不知什么原因。请各位大侠出手相助。
function getlastquote(symbol:string):matchcollection;
var regexp1:regexp;
matchcollection1:matchcollection;
match1:match;
begin
regexp1:=coregexp.create;
with regexp1 do
begin
pattern:='-?([1-9])/d*/./d*|0/./d*[1-9]/d*|0?/.0+|0$</td></tr>)';
ignorecase:=true;
global:=true;
* matchcollection1:=execute(response.DataString)as matchcollection;//运行到这行出错
end;
match1:=matchcollection1.item[22]as match;
squote.lasttrade:=match1.Value;
match1:=matchcollection1.item[23]as match;
squote.change:=match1.Value;
match1:=matchcollection1.item[24]as match;
squote.perchange:=match1.Value;
regexp1:=nil;
//filestream.free;
end;
 

Similar threads

I
回复
0
查看
592
import
I
I
回复
0
查看
738
import
I
I
回复
0
查看
575
import
I
I
回复
0
查看
639
import
I
I
回复
0
查看
716
import
I
顶部