Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search in a text file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01520080
Message ID:
01520083
Views:
54
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform