Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Regular expression in qlikview

I use below syntax to get ids from text

trim(TextBetween(text, '#', ' ')) as ID

but my text has two types

#21561666 testhggg

and

#8585858

when i use above expression i only get #21561666 testhggg  values but i need both

any idea

4 Replies
Anonymous
Not applicable

Could you elaborate more, what is your expected output?

May be PurgeChar(), KeepChar() help you?

tresesco
MVP
MVP

Try to share few more sample values and corresponding expected output. That would help us find a logical pattern and help you write the expression.

avinashelite

please share the sample data and out format required so that it will helpful for us suggest a solution

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

trim(TextBetween(text & ' ', '#', ' ')) as ID


OR Try


KeepChar(text , '#1234567890') AS ID



Hope this helps you.


Regards,

jagan.