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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Last Character for Text Between?

I am currently using the Stripping HTML Tags using Regular Expressions - 4GuysFromRolla.com VB script module to remove HTML tags from a field. I am then using TextBetween to break out the DESCRIPTION_CLEANED field to 5 separate fields. It works for the first 4 but for Voting Statement, I don't know what to do as the ending string because the data is being truncated and the Analytics string is sometimes not included. Similarly, for Analytics, I don't know what to put as the final string. Is there a function to pull last characters?

Select DEFECT_ID 8816 or 7474 as examples.

  stripHTML(DESCRIPTION) as DESCRIPTION_CLEANED,
TextBetween( stripHTML(DESCRIPTION) , 'Current State Summary:' , 'Problem Statement:' )  as CUR_STATE_SUMMARY,
TextBetween( stripHTML(DESCRIPTION) , 'Problem Statement:' , 'Proposed Solution:' )  as PROBLEM_STATEMENT,
TextBetween( stripHTML(DESCRIPTION) , 'Proposed Solution:' , 'Voting Statement:' )  as PROP_SOLUTION,
TextBetween( stripHTML(DESCRIPTION) , 'Voting Statement:' , 'Analytics:' )  as VOTING_STATEMENT,
TextBetween( stripHTML(DESCRIPTION) , 'Analytics:' , 'Analytics'as ANALYTICS,

Labels (1)
11 Replies
vishsaggi
Champion III
Champion III

Not sure may be put an empty string like

TextBetween( stripHTML(DESCRIPTION) , 'Analytics:' , '' as ANALYTICS,

cbaqir
Specialist II
Specialist II
Author

Brilliant!