>function fulltrim( pcStr ) > for lnChar = 1 to len( pcStr ) > if isalpha( substr( pcStr, lnChar, 1 ) ) > exit > endif > endfor > pcStr = substr( pcStr, lnChar ) > > for lnChar = len( pcStr ) to 1 step -1 > if isalpha( substr( pcStr, lnChar, 1 ) ) > exit > endif > endfor > pcStr = left( pcStr, lnChar ) > > return pcStr >endfunc >>
nStartPos = at( left(chrtran( pcStr, '0123456789', '' ), 1), pcStr ) nEndPos = rat( right(chrtran( pcStr, '0123456789', '' ), 1), pcStr ) ?substr( pcStr, nStartPos, nEndPos - nStartPos + 1 )Regards