未声明的标识符:'PosEx'

bei*_*ad 3 delphi

我尝试在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;  
Run Code Online (Sandbox Code Playgroud)

我在谷歌搜索我发现我需要"FastCode.Libraries-0.6.4.zip"我下载它但不知道如何使用它来使代码上面的工作.请帮忙!

Mas*_*ler 6

PosEx在StrUtils单位中定义.确保将其包含在您的uses子句中.