Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

QSense
Not applicable

String function

Hi everybody,

I am not able to do a case about string function

My string is like this

IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS

In my case there is "IPASS" value in the begining and at the end of value I want to remove them and After second slash (red characters) I want to get this part

of value

How can I achieve

I tried with replace and match function but couldnt succeed

Thanks for replies

Tags (1)
1 Solution

Accepted Solutions
flipside
Not applicable

Re: String function

You can do this with 1 command ...

=TextBetween('IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS','/','@IPASS',2)

... this returns the text between the 2nd instance of '/' and the 1st instance of '@IPASS' that follows.

flipside

3 Replies
Not applicable

Re: String function

Hi,

Try this

=SubField(SubField('IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS','/',3),'@',1)&'@'&SubField(SubField('IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS','/',3),'@',2)

There may more efficient way..Smiley Happy

Regards,

Amay

alexandros17
Not applicable

Re: String function

let

Step1 = Replace('IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS', 'IPASS', '');



let Step2 = mid(Step1,Index(Step1,'/',2)+1);



let Step3 = mid(Step2,1, len(Step2)-1);

flipside
Not applicable

Re: String function

You can do this with 1 command ...

=TextBetween('IPASS/0U2kkSH00S/zhangchen.zhang@hcn@IPASS','/','@IPASS',2)

... this returns the text between the 2nd instance of '/' and the 1st instance of '@IPASS' that follows.

flipside