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
bumin
Partner - Creator II
Partner - Creator II

can you provide your qvw?

its_anandrjs
Champion III
Champion III

use subfield function

Not applicable
Author

Pls find the same. I am using personal edition

Thanks,

its_anandrjs
Champion III
Champion III

Use this script

=mid(INPUT,2,len(INPUT)-2)

its_anandrjs
Champion III
Champion III

Use this script for new list box

=mid(Text,2,len(Text)-2)

its_anandrjs
Champion III
Champion III

Load your table like this

T:

LOAD * INLINE [

    Text

    "'290'"

    "'9/454'"

];

A:

LOAD

Text,

Mid(Text,2,len(Text)-2) as NewText // You get this new field

Resident T;

anbu1984
Master III
Master III

To remove single quotes try this

Replace(Input_Field,Chr(39),'')

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

LOAD * ,

Text(Replace(Text, chr(39), '')) as modified

INLINE [

    Text

    "'290'"

    "'9/454'"

];

Regards,

Jagan.

Not applicable
Author

Please find attachment.