大致思路:var s1,s2:String
f:TextFile
K:Integer;begin s1:=''
s2:=''
assignfile(.... while not eof(f) do begin readln(f,s1)
if s2<>'' then s1:=s2+s1
K:=Pos('</a>', s1)
if K>0 then begin memo1.lines.add( Copy(s1,1,K+3)
system.delete(S1,1,K+3)
end
S2:=S1
end;end;