Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search field for string
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01478292
Message ID:
01478300
Vues:
43
i found the following code finds the word but i would like to limit the response
to the surrounding 10 words before and 10 words after the KEYWORD is found.
do while not eof()
cfile = rtrim(teach)
IF 'KEYWORD'$(cFile) = .T.
? cfile
endif
skip
loop
enddo
k

>at a bit of a loss on where to start on this and can use some expert help.
>
>i am looking for a way to search a field for a word.
>when word is found to show the next 10 letters past the word.
>
>Tore gave me some useful search code but i don't know how to apply this to a field - nor how to reveal the search with the 10 letters past
>
>'myname'$(cfile) = .T.
>
>let's say field is called "myfield" and is about 200 characters in length.
>the word i am looking for is "myname" placed anywhere in the field.
>
>the response once the word is found should reveal "myname 123456789"
>
>any suggestions greatly appreciated
>
>thanks
>k
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform