NextWord type function
Posted on 2009-12-27
I am looking for a function that will return the next word in a string when given a keyword and number that reflects the occurrence of that keyword in the string sort of like this.
NextWord('keyword', 'orginal_string', nth_occurrence_of_keyword);
Example: NextWord('home', 'You have a lovely home Mr Smith. I hope to have a home like this someday', 2);
In the above example the word that I would like to return is "like" because it is the next word after the 2nd occurrence of the word home
Can anyone help me with this ?