I tried to use this code in my program in delphi 2007
function ExtractText(const Str: string; const Delim1, Delim2: string): string;
var
pos1, pos2: integer;
begin
result := '';
pos1 := Pos(Delim1, Str);
if pos1 > 0 then begin
pos2 := PosEx(Delim2, Str, pos1+1);
if pos2 > 0 then
result := Copy(Str, pos1 + 1, pos2 - pos1 - 1);
end;
end;
I did a search on google i’ve found that i need “FastCode.Libraries-0.6.4.zip” i download it but don’t know how to use it to make the code above works. please help!
PosEx is defined in the
StrUtilsunit. Make sure to include it in your uses clause.