Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
harleen_singh
Creator III
Creator III

How to remove characters in between of strings?

Hello,

            my string is like this asa--sasfs

or it can be like this --asaa

or like this asdfa---

i want to remove this -- from my string.

how to do it??

thanks

Lavi

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    You can use PurgeChar() function.

    like this.

    =PurgeChar ('ABC ---- PQR','-')

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

8 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    You can use PurgeChar() function.

    like this.

    =PurgeChar ('ABC ---- PQR','-')

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Hi,

use PurgeChar()

like

PurgeChar(<feildname>, '[chars to remove]')

HTH

Reg,

Shubhu

its_anandrjs

Hi,

You have to use Purgechar like this

=Purgechar( YourField, ' - ' )

or for multiple

=Purgechar( Purgechar( YourField, ' - ' ), ' ( ' )

Regards

Anand

Not applicable

Hey Anand,

Is it possible to use the Purgechar function to delete characters from a string, without removing every similar character in that string?
Example:

Purgechar(Message, '_Chart: ')
This will delete every single _ , C, h, a, r, t, :, and spacebar from the 'message string'.


Is it possible to just erase the '_Chart: ' and keep the rest of the _,C,h,a,r,t,: in that string?

Thanks in advance!

tamilarasu
Champion
Champion

Ivo,

You can use replace function in that case.

Replace(Message, '_Chart: ', '')

Not applicable

That worked, Thanks!

tamilarasu
Champion
Champion

Not a problem .

syinarosely
Contributor II
Contributor II

i have something to ask...

The original string is "saya suka makan nasi"

 

How do i remove "saya" and "nasi" in this context?

Please share