Reply To: Stripping non-alphabetic characters out of a field

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Stripping non-alphabetic characters out of a field Reply To: Stripping non-alphabetic characters out of a field

#56186
Jamin Gray
Participant

Robert Milfajt wrote:

regsub -all {[^A-Z,a-z]} $x “” y

ought to do the trick, where x is the input string and y is the output string.

Hope this helps,

Bob

This will also leave commas in the field.  If the system barks at anything but alphas you might want to change it to:

Code:


regsub -all {[^A-Za-z]} $x {} y

or

Code:


regsub -all -nocase {[^a-z]} $x {} y

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10