Normally I would just use boundaries (\b) for this, but since the
current platform is running CF5, that's not an option. For all you regex
people out there, all I want to do is test a string for the existence of
any bad words. 

<cfset badWordList = "lots,of,bad,words,here" />
<cfloop list="#badWordList#" index="wordKey">
  <cfset attributes.replacedString =
reReplaceNoCase(attributes.replacedString, "([^\s]+)?#wordKey#([\s]?)",
"**CENSORED**", "all")>
</cfloop>

Which works ok, but if the word is part of another larger word, I would
like it to be left alone, and currently it is not. Any ideas? TIA.

Mark


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294937
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to