Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Regular expressions w/ Foxpro?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00746548
Message ID:
00746798
Vues:
26
>>>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,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform