Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
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

Hi,

    You can use PurgeChar() function.

    like this.

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

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

8 Replies
kaushiknsolanki

Hi,

    You can use PurgeChar() function.

    like this.

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

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
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