Autor Beitrag
Blamaster
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Sa 26.07.08 20:49 
Hi,

ich benutze momentan folgende Procedur um sachen aus einem html Text zu filtern:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
function readout(text, vorne, hinten: string): string;
var astring: string;
begin
  astring := copy(text, Pos(vorne, text) + length(Vorne), Pos(hinten, text) - Pos(vorne, text) - length(vorne));
  result := astring;
end;


Jetzt ist das Problem, das im Quelltext manchmal Sachen auftauchen wo ein ' mit drin ist z.B. var('HIER STEHT DER ZU FINDENDE SATZ');

Wenn ich nun readout(Quelltext, 'var('', '')');) einsetze gibt es natürlich ein Problem mit dem Syntax, da ich nun zwischen den beiden '' für den Suchbegriff nun noch ein 3. ' stehen habe.

Jemand eine Idee wie ich das Problem lösen kann ?

mfg Blamaster
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 26.07.08 20:54 
s := '''';, dann ist s = '

_________________
We are, we were and will not be.
Blamaster Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: Sa 26.07.08 21:13 
Dankeschön funkt :)