How To Guide

Remove Non-alpha Characters From a String

Last Updated:
August 25, 2016

Two functions, used together, can convert non-alpha characters to blanks, then remove the blanks from the string.

Given a field called X that has a value of - "a!b@c#d$e" - first use TRANSLATE to replace the non-alpha characters with blanks like so:

TRANSLATE(X," ","!@#$") 

This results in - "a b c d e".

The second function - STRIPX - is used to remove multiple occurrences of a character from a string. In this case, the blanks created by the TRANSLATE function are removed. Add STRIPX to the calculation above to achieve the final result of "abcde":

STRIPX(TRANSLATE(X," ","!@#$")," ")


See Also:

Create a Sequence Number in Your View Results

The MOD Function