>>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