I have a data frame in R with the following values. cars autocar cars info what is that donna drive car telephone i need car... I want to select all values which contain 'car', values with three words, and those keywords with car that contain three words. The first part is done with : sqldf("SELECT Keyword FROM dat WHERE Keyword like '%car%'") However, I'm not sure how to pick those values with words and those values with three words AND 'car' [[alternative HTML version deleted]]