You could use replaceListNoCase() from http://www.cflib.org/udf.cfm?ID=276
You could adapt it to use spaces as the delimiter by changing the listGetAt() and listLen() functions. > -----Original Message----- > From: James Johnson [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 16 October 2002 1:16 p.m. > To: CF-Talk > Subject: Searching a string for whole word > > > Hi, > > I'm trying to standardize my data and the company names may have XYZ > Inc. or XYZ, Inc. or XYZ Inc (.) I'm looking for a way to search a > string for a whole word, in order to replace it, similar to doing a > Find/Replace in Word where you can search for the whole word. If I > write: > > <cfset Variables.NewVendor = replace(Variables.NewVendor, "Inc", > "Inc.")> > > it replaces all occurrences of the string "Inc" regardless of > whether or > not it has the ending period. So in other words if the Vendors name is > malformed, such as, "XYZ Inc" I want to change it to "XYZ, Inc." > > Suggestions? TIA, > > James > > ******************************************* > James Johnson > SMB-Studios > Innovative Online Learning for Spirit, Mind and Body > www.smb-studios.com > [EMAIL PROTECTED] > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com

