Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Argh! Strings
Message
 
To
19/11/2010 12:15:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01489800
Message ID:
01489801
Views:
92
>I am running into trouble finding a solution to this.
>
>I want to search inside a string of text to find a word.
>Once the word is found I want to back up say 50 characters.
>Then extract about a hundred characters forward from the 50 characters back position.
>The result would be a phrase of 100 characters with the seached word in the centre.
>
>PS - This is recreational programming - Nothing urgent going on :)

something like this should work:

SUBSTR(searchfield,MAX(0,ATC('searchword',searchfield)-50),100)
Brandon Harker
Sebae Data Solutions
Previous
Reply
Map
View

Click here to load this message in the networking platform