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: 
gizzel123
Creator
Creator

extract string, starting and ending after with "_"

Hi All,

I have to extract the string ...strarting after  and ending before "_".

please suggest.

10 Replies
mdmukramali
Specialist III
Specialist III

Dear ,

You can use SubField function .

Like

=SubField('_Hello_','_',2)

or

=SubField('Hello_','_',1)

Thanks,

Mukram

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Or use TextBetween(), like in:

=TextBetween('1234567_Hello_ABCDEFGHIJ', '_', '_')

Add a fourth parameter n if you want to start parsing only after the n-th occurrence of _

gizzel123
Creator
Creator
Author

it is not working.

Not applicable

Could you provide an example of the field you are trying to parse?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

What is not working? Could you at least post an example of your input string? Otherwise we will be working in the dark.

padmanabhan_ram
Creator II
Creator II

Hi Gizzel,

Please find the attached.

Thanks

Padmanabhan

Peter_Cammaert
Partner - Champion III
Partner - Champion III

It's working perfectly. The box to the right shows the second value delimited by ".

Or is this not what you want?

BTW there aren't any underscores to be found in your field Test.

MarcoWedel

=TextBetween(string,' ','_')

padmanabhan_ram
Creator II
Creator II

HI,

You can replace " " " by " _ ".

Thanks

Padmanbhan