Kod: Tümünü seç
<DIV class="column "><B>3.75</B><BR><SPAN>%1.55</SPAN></DIV>
<DIV class="column "><B>3.20</B><BR><SPAN>%2.49</SPAN></DIV>
<DIV class="column max"><B>1.60</B><BR><SPAN>%51.19</SPAN></DIV>
<DIV class="column "><B>1.40</B><BR><SPAN>%1.32</SPAN></DIV>
<DIV class="column "><B>2.05</B><BR><SPAN>%7.59</SPAN></DIV>
<DIV class="column "><B>1.70</B><BR><SPAN>%3.42</SPAN></DIV>
<DIV class="column "><B>1.65</B><BR><SPAN>%0.35</SPAN></DIV>
Kod: Tümünü seç
var
x:integer;
gecici,aranan:string;
begin
x:=0;
gecici:='';
aranan:='<DIV class="column max">';
while pos('<DIV class="column max">',gelen)>0 do begin
gecici:=Copy(gelen, 1, Pos('<B>', gelen)-1);
inc(x);
Delete(gelen, 1, pos('</DIV>', gelen )+5);
[color=#FF0000] if gecici=aranan then Form1.Memo2.Lines.Add(gecici+'---'+IntToStr(x));[/color]
gecici:='';
end;
end;
Kodu pos fonksiyonu ile yaparsam
Kod: Tümünü seç
var
x:integer;
gecici,aranan:string;
begin
x:=0;
gecici:='';
aranan:='<DIV class="column max">';
while pos('<DIV class="column',gelen)>0 do begin
gecici:=Copy(gelen, 1, Pos('<B>', gelen)-1);
inc(x);
[color=#FF0000] if pos(aranan,gelen)>0 then Form1.Memo2.Lines.Add(gecici+'---'+IntToStr(x));[/color]
Delete(gelen, 1, pos('</DIV>', gelen )+5);
gecici:='';
end;
end;

<DIV class="column ">---1
<DIV class="column ">---2
<DIV class="column max">---3