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:
01520099
Views:
67
This message has been marked as a message which has helped to the initial question of the thread.
>>>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.
>>
>>Something like this (no local declaration nor error testing etc)
>>
>>
>>clear
>>loRegExp = CREATEOBJ('VBScript.RegExp')
>>loRegExp.Global = .t.                 && translate all occurances
>>loRegExp.IgnoreCase = .t.             && case insensitive
>>loRegExp.Pattern = '[^\.]VFP2SQL'
>>lcContents	= FILETOSTR({Your File})
>>loMatches	= loRegExp.Execute(lcContents)
>>? 'Found ', loMatches.Count, 'matches'
>>IF loMatches.Count > 0
>>	FOR lnMatch = 0 TO loMatches.Count - 1
>>		loMatch	= loMatches.Item(lnMatch)
>>		? CHR(9) + 'Match ' + TRANSFORM(lnMatch) + ': "' + loMatch.Value + '" at position ' + TRANSFORM(loMatch.FirstIndex)
>>	NEXT lnMatch
>>endif	
>>
>
>Thanks, Hugo and Boris. I've tested it, it seems to work. Is it case sensitive or case-insensitive?

It depends of:
loRegExp.IgnoreCase = .t.             && case insensitive
loRegExp.IgnoreCase = .f.             && case sensitive
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform