Try this:
Function GetNum
LPARAMETERS lcString as Character
RETURN VAL(CHRTRAN(lcString,CHRTRAN(lcString,"0123456789",""),""))
?GetNum("A114")
>Hi there,
>
>I'm working on a VFP 7.0 application and need to evaluate a string to see if certain characters in it are letters or numbers. For instance, I may have "A114" or "AR0559" as my string. I need to parse the string, separating the letters from the numbers (the letters will always come first, followed by several numbers).
>
>Is there a quick way to do this in VFP?
>
>Thanks much,
>
>Joe
Peter Cortiel