Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm trying to remove spaces and special characters from a string
I use PurgeChar([Customer TOPS],' ,./-_+()£$!&*'), which is great.
But now I need to include the single quote as one of the chars to remove. I've tried square braces, using SET to create a variable, etc., but I just can't get the syntax right.
regards,
Marty.
Hi Martyn,
Try this
PurgeChar(PurgeChar([Customer TOPS],chr(39)),'./-_+()£$!&*')
Hi MartynLloyd
Could you attach the sample application for better understanding and provide quick solution.
Thank you.
Instead of purge can you use keepchar()
for eg. if you want only numbers from string then use,
keepchar([Customer TOPS],'0123456789')
or
keepchar([Customer TOPS],'abcdefghijklmnopqrstuvwxyz')
For keeping letters, I would suggest a small edit:
KeepChar(Lower([Customer TOPS]), 'abcdefghijklmnopqrstuvwxyz')
Hi Martyn,
Try this
PurgeChar(PurgeChar([Customer TOPS],chr(39)),'./-_+()£$!&*')
Hi Martyn,
Try removing the ASCII value of apostrophe
PurgeChar(Lower(PurgeChar([Contractholder],' ,./-_+()£$!&*')),chr(39))