Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Atcline()
Message
From
23/11/2001 21:35:55
 
 
To
23/11/2001 13:25:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00585185
Message ID:
00585306
Views:
25
>Hi,
>
>Is there anyway I can search for a particular occurance of a charactor string? Say I have a memofield and I am searching for "bmp", can I somehow tell it search for the 2nd time "bmp" shows up? I know you can do that with atc() but it would be a lot easier if I could use atcline()

This is a situation where not relying on the internal string handling capabilities pays off; it's a perfect place for the use of the VBScript.RegExp object, which can look for occurances of a regular expression in a string and return a collection of occurences through it's Execute() method. I'd suggest starting with Wrox Press' "VBScript Programmer's Reference Guide" as source material; you can also look at the extensive documentation on the Windows Script Host on the Microsoft Web Site, or at the 5 part article that George Tasker and I did for VFUG about a year ago (www.vfug.org) Also, embedded in my messages are a fair number of examples of the use of the RegExp object in VFP.

You might want to check out various links in my sig block for more reference materials.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform