Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

RemoveHTML not working in QV API

Hi community,

I have some QV code from a demo document and I tried to copy a portion of it to a document on my system.  The code is RemoveHTML and it doesn't "turn blue" except for in the parent demo document.  Any ideas why this is or what I can do?

1 Solution

Accepted Solutions
Not applicable
Author

Press control M and make a macro with this code:

function RemoveHTML( strText )

          Dim RegEx

          Set RegEx = New RegExp

          RegEx.Pattern = "<[^>]*>"

          RegEx.Global = True

          RemoveHTML = RegEx.Replace(strText, " ")

End function

View solution in original post

2 Replies
Not applicable
Author

Here's an example:

load



RemoveHTML(TextBetween(TextBetween(YahooKeyStatsText, 'Market Cap (intraday)',''),'<td class="yfnc_tabledata1">','</td>')) as [Valuation: Market Cap - RAW],

RemoveHTML(TextBetween(TextBetween(YahooKeyStatsText, 'Enterprise Value',''),'<td class="yfnc_tabledata1">','</td>')) as [Valuation: Enterprise Value - RAW],

What might the document have different to allow this?

Not applicable
Author

Press control M and make a macro with this code:

function RemoveHTML( strText )

          Dim RegEx

          Set RegEx = New RegExp

          RegEx.Pattern = "<[^>]*>"

          RegEx.Global = True

          RemoveHTML = RegEx.Replace(strText, " ")

End function