Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
retko1985
Creator II
Creator II

Extract text before some sign and probably space before this sign.

Hello,

I have a text something like this:

one two three four. [1 2 3 4]

I need to extract only "one two three four."

Would be better to get it without space before [.

Can someone help me please?

Thank you

1 Solution

Accepted Solutions
thevingo
Creator
Creator

Trim(SubField('one two three four. [1 2 3 4]','[',1))

View solution in original post

5 Replies
techvarun
Specialist II
Specialist II

KeepChar ( '[1 2 3 4]','0123456789' )

retko1985
Creator II
Creator II
Author

I cannot use keepchar, I dont know whats in there between [].

And I dont want to keep it, I need to cut it out and get whats left.

sunny_talwar

Not sure I understand, but how about PurgeChar

Trim(PurgeChar( ...., '[]')) as ....

thevingo
Creator
Creator

Trim(SubField('one two three four. [1 2 3 4]','[',1))

retko1985
Creator II
Creator II
Author

Works great, thanks.