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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Removing Special characters and numbers from string?

"'$'Venkat40!23# " how can i get only 'venkat' from that string?

I used Keepchar('$'Venkat40!23#','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz').it is giving output but i m looking for better solution.

Thanks in Advance

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=KeepChar('$Venkat40!23#', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')

Regards,

Jagan.

View solution in original post

7 Replies
swuehl
MVP
MVP

There is also PurgeChar() function, if this is any better.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=KeepChar('$Venkat40!23#', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')

Regards,

Jagan.

Anonymous
Not applicable
Author

Thanks Swuehl..

Anonymous
Not applicable
Author

Thanks Jagan...I tried that function and i am getting the result but i m trying to avoid to write "'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'" this much of string. 

jagan
Partner - Champion III
Partner - Champion III

Hi Venkat,

I think this is the best option, you declare a variable and use it in the expression

vAlphabets = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

=KeepChar('$Venkat40!23#', vAlphabets)


Regards,

Jagan.

Anonymous
Not applicable
Author

Ya we can do like that but for only one string its not good to have variable i think. thank u Jagan...

jagan
Partner - Champion III
Partner - Champion III

Hi Venkat,

Yes, as far I know this is the solution, we have to go like this.

Regards,

Jagan.