Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding special characters
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00405140
Message ID:
00405262
Views:
16
>Can anyone tell me how I can find special characters in a field that has the folloiwng format: AAA-AAAA-AAAAA

If you don't know what the special character might be ahead of time (so Bill's solution won't work) you can try something like this:
lcText = strtran(alltrim(fieldname.value),'-','')   && strip out the dashes
for li = 1 to len(lcText)
   if not between(asc(substr(lcText,li,1)),65,90) ;
          and not between(asc(substr(lcText,li,1)),97,122)
      * Not an upper or lower case letter - assume special character
      * If you want to accept any other charcters, add them to the condition
   endif
endfor
Previous
Reply
Map
View

Click here to load this message in the networking platform