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

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