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: 
ivan_will
Partner - Creator II
Partner - Creator II

Tricky load from an internet page ? It loads only the first value ... from a line ... using textbetween function

Hi,

I'm trying to load only the text AAA, BBB, CCC from the example below:

This exaple is one line in a web page ! I use textbetween function but it returns me only the AAA value , the BBB and CCC didn't!

Eoifu p 0-32-834 =03qpoeop sdf lfk 2-54i 023 sdfj 5. AAA.jpg qwpoiep9qei i ja dsk zdc '39pr 'wjf dkljc s;nc o3ir iejdf slkjd'ka]5.BBB.jpg ip ppowqewaposdfdsvjd fvpoes[0ewq0wqopewlkvdlk sdpodsmnzs[oeop 5. CCC.jpg opdjwopwirjkwmw lkwq oi232op430320-21 093939 weqodsf

So please could you give me some joker how to load all the three values I want ?

Tnx!



1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Ivan,

First off, QV is not the best tool for string purges. That being said, it is possible, but you will most likely have to take the logic to the script. The logic would be as follows:


SET vString = 'Eoifu p 0-32-834 =03qpoeop sdf lfk 2-54i 023 sdfj 5.AAA.jpg qwpoiep9qei i ja dsk zdc '39pr 'wjf dkljc s;nc o3ir iejdf slkjd'ka]5.BBB.jpg ip ppowqewaposdfdsvjd fvpoes[0ewq0wqopewlkvdlk sdpodsmnzs[oeop 5.CCC.jpg opdjwopwirjkwmw lkwq oi232op430320-21 093939 weqodsf';
LET vJPGInstances = substringcount('$(vString)','.jpg');
data:
LOAD
textbetween('$(vString)','.','.jpg',RecNo()) as final_field
AUTOGENERATE $(vJPGInstances);


Regards,

View solution in original post

2 Replies
vgutkovsky
Master II
Master II

Ivan,

First off, QV is not the best tool for string purges. That being said, it is possible, but you will most likely have to take the logic to the script. The logic would be as follows:


SET vString = 'Eoifu p 0-32-834 =03qpoeop sdf lfk 2-54i 023 sdfj 5.AAA.jpg qwpoiep9qei i ja dsk zdc '39pr 'wjf dkljc s;nc o3ir iejdf slkjd'ka]5.BBB.jpg ip ppowqewaposdfdsvjd fvpoes[0ewq0wqopewlkvdlk sdpodsmnzs[oeop 5.CCC.jpg opdjwopwirjkwmw lkwq oi232op430320-21 093939 weqodsf';
LET vJPGInstances = substringcount('$(vString)','.jpg');
data:
LOAD
textbetween('$(vString)','.','.jpg',RecNo()) as final_field
AUTOGENERATE $(vJPGInstances);


Regards,

ivan_will
Partner - Creator II
Partner - Creator II
Author

Great !!! Thanks 🙂 It works !!!!