msgbartop
Arama Motoru Optimizasyonu , Scriptler ,Genel Bilgiler ve SEO Makaleleri
msgbarbottom

Delphi strip_tags 18 06 10

function StripHTML(S: string): string;
var
  TagBegin, TagEnd, TagLength: integer;
begin
  TagBegin := Pos( '<', S);      // search position of first < 

  while (TagBegin > 0) do begin  // while there is a < in S
    TagEnd := Pos('>', S);              // find the matching >
    TagLength := TagEnd - TagBegin + 1;
    Delete(S, TagBegin, TagLength);     // delete the tag
    TagBegin:= Pos( '<', S);            // search for next <
  end;

  Result := S;                   // give the result
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo2.Text := StripHTML(Memo1.Text);
end;

Etiketler: ,