i need to extract string from a text as following example
Hi i have no name <z>empty</z>
i wanted to extract only text before <z> into array or string which is hi i have no name
i tried this function
procedure Split (const Delimiter: Char; Input: string; const Strings: TStrings);
begin
Assert(Assigned(Strings)) ;
Strings.Clear;
Strings.StrictDelimiter := true;
Strings.Delimiter := Delimiter;
Strings.DelimitedText := Input;
end;
but its only can split chars like ;,: etc.. i wanted to start split with this specific string <z>
<z>is the sep, thenempty</z>is the second string, right. Or do you need an XML parser. - David Heffernan<z>kinda likestring := Copy(Hi i have no name <z>empty</z>, 1, Pos('<z>', Hi i have no name <z>empty</z>)-1);- DelphiStudents := Copy(s,1,Pos('<z>',s)-1);you mean? - LU RD