Skip to Content
0
Apr 12, 2007 at 01:30 PM

Searching for a whole word within a sentence

105 Views

I am trying to search for a whole word only in a sentence. The problem is if I use CS then I get things that contain the string in other words. If I use CO or CP then there is no match because there are other words in the sentence. I don't think it's practical to split the sentence into individual words and then compare each word as the sentence is of an unknown length and could be made up of many words.

An example:

Sentence 1 - THIS IS ABOUT RF OUTPUTS.

Sentence 2 - THIS IS ABOUT MY PERFORMANCE

The user wants to search for sentences containing RF. In this search I only want sentence 1 to be found and not the RF in the word performance in sentence 2.

Can anyone tell me how to do this.

Many thanks

Karen