Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function for Finding Word Position(NOT alphabet)
Message
De
20/08/2013 08:10:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/08/2013 15:24:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01580784
Message ID:
01580805
Vues:
44
>Suppose I am having the following three strings
>
>403.879 378.665 MV (Higher Edu. CESS)SH
>
>456.597 337.070 MV (require any Signature)SH
>
>/F0 FF 7.0 SCF SF 403.879 400.524 MV (Service Tax)SH
>
>I need to extract the Values 403.879 & 378.665 from it (See first String).The above values are always before 'MV'
>
>I may use GETWORDNUM() But How will I get the Position of "MV" in Each string. The AT() Function gives me the character Postion of MV and not Word Position, I need the Word Position.
>
>How It will be Done ?

1) Get the character position of "MV" with the AT() function
2) Extract a substring before that position, with the LEFT() function
3) Process the words in that substring with GETWORDNUM()
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform