Dear ALL,
I have some strange strings, with tags inside tags like this:
<<5%>> or <rarely <5%>>
and I want to strip these inner tags, so that in the first case I would have an empty tag ('<>'), and in the second case I would have a string like '<rarely>'.
I came up with a simplistic function as follows:
function StripInner(const S: string): string;
begin
Result := Copy(S, Pos('<<', S) + 1, Length(S) - 2);
end;
but it just strips the outer brackets, keeping the inner tag ('<5%>') in the first case and returning a completely wrong string ('<rarely <5%') in the second case.
Could anyone give me hint on how to do this?
Thanks in advance!
With
best wishes,