Вот как то так:
Код
function MyCopy(Text, Tag1, Tag2: string): string;
var
i1,i2: integer;
begin
result := '';
if (pos(Tag1, Text) <> 0) and (pos(Tag2, Text) <> 0) then
begin
i1 := pos(Tag1, Text) + length(Tag1);
i2 := pos(Tag2, Text) - i1;
if i2 > 0 then
result := copy(Text,i1,i2);
end;
end;