ok right now i am doing this <cfset dreamtext = REReplace(dream.dream,"([[:alpha:]])([^ [:alpha:]])","\1 \2","ALL")> <cfset dreamtext = REReplace(dream.dream,"([^ [:alpha:]])([[:alpha:]])","\1 \2","ALL")>
<CFQUERY datasource="#request.dsn#" name="dictionary"> SELECT DISTINCT DJ_Dictionary.Word FROM DJ_Dictionary WHERE '#dreamtext#' LIKE '% ' + DJ_Dictionary.Word + ' %' ORDER BY DJ_Dictionary.Word </CFQUERY> Works great and is very speedy. I implement the spaces then just find the words and the results come back very fast. HOWEVER how would i add one more where clause to pick up any word ending in S. Meaning if the word bat is in the dream it will pick it up, but if it's bats it will not, and i want to pick up plurals. I tried OR '#dreamtext#' LIKE '% ' + DJ_Dictionary.Word[s] + ' %' but that didn't work I am sure i Have the right idea just the wrong format. LOL Anyway ideas? Kelly ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

