Sunil, An easy way to do what you want is to define a regular expression that matches any string that ends in the word in question, like this: .*word$ and then reverse the test. That is, if this regular expression matches, the string is a non-match, and if it does not match, the string is a match.