Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search in a text file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01520080
Message ID:
01520083
Vues:
56
>>Hi everybody,
>>
>>If I have a text file (a program) and want to search for 'VFP2SQL', but not for '.VFP2SQL' (e.g. I want to find occurrences where there is no . before that string), that can I do?
>>
>>Thanks in advance.
>
>On top off my head:
>
>lcFile = FILETOSTR(GETFILE())
>lnAt   = AT("VFP2SQL", lcFile)
>DIMENSTION OccPosition[1]
>LOCAL lnOccurance
>lnOccurance = 0
>DO WHILE lnAt # 0
>   IF NOT SUBSTR(lcFile, lnAt-1,1) == "."
>      lnOccurance = lnOccurance + 1
>      DIMENSTION OccPosition[lnOccurance]
>      OccPosition[lnOccurance] = lnAt
>   ENDIF
>   lcFile = SUBSTR(lcFile, lnAt+7)
>   lnAt   = AT("VFP2SQL", lcFile)
>ENDDO
>
>
>But maybe with RegExpr you can do this much more easier :-)

Sure, RegExpr should be much easier. Wondering if someone can help here, as I am swamped at the moment.

BTW, this is how occurrence is spelled.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform