Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to remove the HTMl Tags

Hi All,

Just wanted to know how we can remove the html tags. Please find the attached text file. This is just an sample.

Some times the entire html page will be store in the database.

The HTML taged content are store inthe database.

Thanks & Regards,

Saran.

4 Replies
vgutkovsky
Master II
Master II

Not applicable
Author

hi,

For example from a batch file with command line bellow. From your file there are two lines remaining " Show copied text" and "Default Closed Tab"

sed -e "s/<[^>]*>//" file.html

There is sed for Windows , for example here: http://gnuwin32.sourceforge.net/packages/sed.htm

-Alex

Not applicable
Author

Hi,

If you create macros in Jscript instead of VBscript, there is full regular expression support.


function dropTags(row) {
return row.replace(/<[^>]*>/gi, "");
}


The loading script becomes


raw_html:
LOAD @1 as row
FROM 1.txt
(txt, codepage is 1252, no labels, delimiter is '\n', no quotes);

no_tags:
LOAD dropTags(row) as clean_row
resident raw_html;


-Alex

Anonymous
Not applicable
Author

tHIS LINK DOES NOT OPEN ..CAN ANY ONE GIVE ACCESS TO THIS ...

See this post: http://community.qlik.com/forums/p/33571/133775.aspx