>>23^^C4~21^^C4~22^^C4 >>>>
>>23^^C4~22^^C4 >>>>
>>23^^C4~21^^C4~22^^C4~27^^C4 >>>>
>lcDig="" >for i=1 to getwordcount(lcS, "~") > lcWord=getwordnum(lcS, i, "~") > j=1 > do while isdig(substr(lcWord,j)) > lcdig=lcdig+substr(lcWord,j,1)) > enddo >endfor>outer loop counts words split at tilde, inner pulls starting digits from these words until a non-digit is encountered..
CLEAR m.ModString = "23^^C4~21^^C4~22^^C4~27^^C4" m.ModCount = OCCURS('~', m.ModString) m.Mods = '' FOR ModLoop = 1 TO m.ModCount m.Mods = m.Mods + SUBSTR(m.ModString, AT('~', m.ModString, ModLoop) +1, 2) ENDFOR ? m.ModsBut I think yours is cleaner.