Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
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
MVP & Luminary
MVP & Luminary

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
MVP & Luminary
MVP & Luminary

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

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

Ivo,

You can use replace function in that case.

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

Not applicable

That worked, Thanks!

tamilarasu

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