Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

gizzel123
New Contributor II

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
Valued Contributor II

Re: extract string, starting and ending after with "_"

Dear ,

You can use SubField function .

Like

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

or

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

Thanks,

Mukram

Re: extract string, starting and ending after with "_"

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
New Contributor II

Re: extract string, starting and ending after with "_"

it is not working.

Not applicable

Re: extract string, starting and ending after with "_"

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

Re: extract string, starting and ending after with "_"

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
Contributor II

Re: extract string, starting and ending after with "_"

Hi Gizzel,

Please find the attached.

Thanks

Padmanabhan

Re: extract string, starting and ending after with "_"

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.

Re: extract string, starting and ending after with "_"

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

padmanabhan_ram
Contributor II

Re: extract string, starting and ending after with "_"

HI,

You can replace " " " by " _ ".

Thanks

Padmanbhan

Community Browser