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

Cleaning up a data string with < > delimeters

Hi,

I'm trying to clean up data I'm getting from a forum db. The problem I'm having is that the body of the conversations include formatting tags. So in order to just leave the text parts I need to remove the tags. Fortunately all of the markup used is contained within < and >. How do I go about saying:

Clean(Field, Delete text from '<' to '>')

Is this possible?

E.g. the follow is what I currently have:

"anyone who has access to this forum should be on this list<br /><br /><br />Project Leader:<br /> Legacy<br /><br />Lead Artist:<br />"

and I want to just reduce it to "anyone who has access to this forum should be on this list Project leader: Lead Artist:"

UNLESS - there is a way to get Qlikview to actually use these tags and format these messages properly!

Thanks!

2 Replies
nagaiank
Specialist III
Specialist III

The following expression does what you want to do for the sample string:

Replace('<br /><br /><br />Project Leader:<br /> Legacy<br /><br />Lead Artist:<br />','<br />','')

For other tags, you may try a combination of TextBetween() and Replace() functions.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You may want to display the text in Stefan Walther's HTML2 extension.

QlikTip #39: Displaying Html content within QlikView (Minimalistic HtmlTextBox Object Extension)

If you don't want to use an extension, you can translate the tags as NagaianK suggested, but I would use MapSubstring for flexibility;

TagMap:

MAPPING

LOAD from, Evaluate(to) INLINE [

from, to

<br />, chr(10)

<p/>, chr(10)

]

;

Raw:

LOAD MapSubString('TagMap',Raw) as TranslatedText