Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find number within string
Message
De
06/07/1999 14:02:39
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00237774
Message ID:
00237861
Vues:
14
Hi, John-
Let us know will you? It seems like Todd's point is critical here. As long as we're all having fun, here is my humble offering. < s >
lnNum = 0
FOR lni = 1 TO LEN( lcString )
  lnNum = SUBSTR( lcString, lni )
  IF lnNUM <> 0 && We got us a number w/ no imbedded char :)
    EXIT && If you need all the numbers, you could strtran the found one out and continue
  ENDIF
  
NEXT lni
IF lnNum = 0
  *!* Do what you want to now that you have it.
  *!* Note, if you need to find *real* 0s then you'd need to modify this logic.
ENDIF
>Is there a way to find a number within a string? Here's the twist, the number could be anywhere in the string, and I want to find any number...like this "#70 blue" or "70 blue" or "blue 70"
>
>any help appreciated:)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform