Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

removing special chars in string

Hi, I have data like this '290' and '9/454' and my output should be 290  and 9/454 INPUT '290' '9/454' OUTPUT 290 9/454 I tried using PURGE, KEEP CHAR functions but it seems not working. Pls let me know what is the right formula. Thanks,

10 Replies
arjunkrishnan
Partner - Creator II
Partner - Creator II

Hai Frd

I Just try This One ..Lets Try This One

T1:

LOAD * INLINE [

name    gard

'290' and     '9/454'

'291' and    '10/454'

'292' and    '11/454'

];

T2:

LOAD *,[name    gard] as INPUT,

keepchar ( [name    gard] ,0123456789 )as TEST1,

purgechar([name    gard],' '' ') as TEST2 Resident T1;

T3:

LOAD left(TEST2,3)&Chr(32)&Mid(TEST2,4,3)&Chr(32)& right(TEST2,6)as OUTPUT Resident T2;

My Out Put Like That