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:
01520092
Views:
49
>>
>>
>>o_regexp1=NEWOBJECT("_regexp","c:\program files (x86)\microsoft visual foxpro 9\ffc\_regexp.vcx")
>>o_regexp1.Pattern = "%[^.]VFP2SQL%"
>>lnOcc = o_regexp1.Execute(FILETOSTR(GETFILE()), .t.) && .t. -> Case sensitive
>>DISP MEMO LIKE o_regexp1.matches
>>
>
>This doesn't seem to work.

You need to "escape" the dot by adding a backslash before it, so instead of [^.] use [^\.], otherwise it means any character (with few exceptions) not sure why Borislav uses the %, it is probably something for the regexp class?
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform