Local s,Ln1,Ln2,Lc1,Lc2
s="@a-Bc34 k-"
Ln1=Len(s)
Lc1=''
For i=1 To Ln1
Lc2=Substr(s,i,1)
Ln2=Asc(Lc2)
If Ln2=45 Or Between(Ln2,65,90) Or Between(Ln2,97,122)
Lc1=Lc1+Lc2
Endif
Endfor
If Right(Lc1,1)=[-]
Lc1=Left(Lc1,Len(Lc1)-1)
Endif
? Lc1
s = "@a-Bc34 k-"
r = ''
len = LEN(s)
FOR i=1 to LEN(s)
c = SUBSTR(s,i,1)
IF UPPER(c) >= 'A' and UPPER(c) <= 'Z' or c = '-' and i < len
r = r + c
ENDIF
NEXT
? r