Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Regular expressions w/ Foxpro?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00746548
Message ID:
00746798
Views:
23
>>>I want to seach a string for the presence of a specific word. I just need to use it on this one small function from within my app and the simplest method would be the best. Any recommendations?
>>
>>You mean, like:
>>
>>
>>IF "Word" $ cString
>>   ?  "Found it"
>>ENDIF
>>
>>
>>If case is not important, change both with UPPER().
>
>
>Oops. I didn't think $ works with a variable. I only used it in a select statement. Why I thought that is beyond me.

You can also use:
? ATC( "Word", cString ) > 0
And in that case, the search is case-insensitive without conversion. Most string functions in VFP support case-insensitive use.

My 0.02,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform