Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Special character removal

Hi-Can someone please help me on this? I need to remove multiple special characters from a string field.Example

a#riz'ona!

&vir$gin-ia

*flori&da1@

Result should be

arizona

virginia

florida

Thanks,Pooja

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi Pooja,

Try with KeepChar function,

=keepchar ( 'a#riz'ona!','abcdefghijklmnopqrstuvwxyz' ) returns 'arizona'

Hope this helps you.

Regads,

Jagan.

View solution in original post

8 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try using Keepchar()

KeepChar(s1 , s2)

Returns the string s1 less all characters not contained in string s2.

Example:

keepchar ( 'a#riz'ona!','abcdefghijklmnopqrstuvwxyz' ) returns 'arizona'

Hope this helps you.

Regards,

Jagan.

swuehl
MVP
MVP

Try using keepchar or purgechar functions, like

purgechar('&vir$gin-ia','&$-')

Not applicable
Author

Thanks..but with purgechar, I have to include all the special characters because for each row the string has different specia characters.

Anonymous
Not applicable
Author

keepchar works if you have your fields in a column , attached a file.

jagan
Luminary Alumni
Luminary Alumni

Hi Pooja,

Try with KeepChar function,

=keepchar ( 'a#riz'ona!','abcdefghijklmnopqrstuvwxyz' ) returns 'arizona'

Hope this helps you.

Regads,

Jagan.

Not applicable
Author

Hi jagan..

                 In my data i have single Quotes in All the Rows how can remove it in backend..i wil load all the fields using Load * from....So in that hw can i remove...

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try to use PurgeChar() like below

PurgeChar(FieldName, Chr(39))

Regards,

Jagan.

Not applicable
Author

i was just taking All the fields i am havng more than 50 fields....So is that any way to remove using loop or anything..