Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding special characters
Message
 
À
15/08/2000 14:49:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00405140
Message ID:
00405262
Vues:
17
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform