经常用,不想再费脑筋
function TForm1.GetStr(StrSource, StrBegin, StrEnd: string): string;
var
in_star,in_end:integer;
strtmp:string;
begin
in_star:=AnsiPos(strbegin,strsource)+length(strbegin);
strtmp:=copy(strsource,in_star,length(strsource));
in_end:=AnsiPos(strend,strtmp);
result:=copy(strsource,in_star,in_end-1);
end;
function TForm1.GetStr(StrSource, StrBegin, StrEnd: string): string;
var
in_star,in_end:integer;
strtmp:string;
begin
in_star:=AnsiPos(strbegin,strsource)+length(strbegin);
strtmp:=copy(strsource,in_star,length(strsource));
in_end:=AnsiPos(strend,strtmp);
result:=copy(strsource,in_star,in_end-1);
end;