also found this from another site
//construct an array of alpha characters.
StringVar Array
legalchar:=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R",
"S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p",
"q","r","s","t","u","v","w","x","y","z"];
StringVar LSt:= {TABLE.FIELD};
StringVar RSt:= "";
Local NumberVar i;
// Parses the string and removes non-alpha characters
For i := 1 to length(Lst) Do
If LSt in legalchar then
Rst:= Rst + Lst
Else Rst := Rst;
//Returns the new string
Rst;