uniguibbs Posted July 7, 2013 Posted July 7, 2013 help, how to copy text from UniDBHtmlMemo without Html tag? Quote
uniguibbs Posted July 7, 2013 Author Posted July 7, 2013 actually , i want export data to excel without Html tag. Quote
Sherzod Posted July 7, 2013 Posted July 7, 2013 Hi uniguibbs. Try this function: function StripHtmlMarkup (const source: string): string; var i, count: Integer; InTag: Boolean; P: PChar; begin SetLength (Result, Length (source)); P := PChar (Result); InTag := False; count := 0; for i := 1 to Length (source) do if InTag then begin if source [i] = '>' then InTag := False; end else if source [i] = '<' then InTag := True else begin P [count] := source [i]; Inc (count); end; SetLength (Result, count); end; for example: UniMemo1.Text := StripHtmlMarkup (UniHTMLMemo1.Text); Source: http://stackoverflow.com/questions/5717405/how-to-extract-text-from-such-type-of-html-source ...or you can look in the direction of regular expressions... Sincerely. 2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.