Thema: Delphi EOF für Strings?

Einzelnen Beitrag anzeigen

Gambit

Registriert seit: 28. Mai 2003
680 Beiträge
 
Delphi 7 Professional
 
#6

Re: EOF für Strings?

  Alt 5. Feb 2004, 18:39
ok, hier mal der Quelltext, is alles noch Probiererei...


Delphi-Quellcode:
if CBStrongSearch.Checked = true then
  begin
    Pos1:=ansiPos('<LI>', htmlcode);
    Delete(htmlcode, 1, Pos1-1);
    foundTitle:= false;

      While foundTitle = false do
      begin
        Pos2:=ansiPos('</A>', htmlcode);
        NewString:=ansiMidStr(htmlcode,1,Pos2+3);
        If AnsiContainsText(NewString, edit1.Text+'</A>') then foundTitle:= true
        else Delete(htmlcode, 1, Pos2+3);
        If ansiMidStr(htmlcode, 1,4)<>'<LI>then
        begin
          showMessage('Nicht gefunden');
          break;
        end;
      end;
    
    showMessage(NewString);
  end else
die Stelle mit dem Break funzt nicht.

Hier mal ein Ausschnitt aus dem HTML-Code:

[/B]</FONT>

<FONT SIZE = "2" FACE = "arial" COLOR = "black">

<UL>

<LI><A HREF = "/entertainment/djfl/1110/111216.html"> A Beautiful Mind</A>
<LI><A HREF = "/entertainment/djfl/1000/100028.html"> A Chinese Star Story</A>
<LI><A HREF = "/entertainment/djfl/1065/106672.html"> A Good Man In Africa</A>
<LI><A HREF = "/entertainment/djfl/1050/105027.html"> A Hard Day's Night</A>
<LI><A HREF = "/entertainment/djfl/1100/110453.html"> A Night At The Roxbury</A>
<LI><A HREF = "/entertainment/djfl/1110/111054.html"> A. I. - Künstliche Intelligenz</A>
<LI><A HREF = "/entertainment/djfl/1080/108256.html"> Abbuzze! - Der Badesalz-Film</A>
<LI><A HREF = "/entertainment/djfl/1065/106673.html"> Abendanzug</A>
<LI><A HREF = "/entertainment/djfl/1100/110281.html"> Abgefahren</A>
<LI><A HREF = "/entertainment/djfl/1115/111586.html"> Abgezockt!</A>
<LI><A HREF = "/entertainment/djfl/1110/111331.html"> About A Boy</A>

Gruß

Gambit
  Mit Zitat antworten Zitat