Look Howie! Someone else used whilst!

I was regaling the BF with the tale of you poking fun of my usage of the
word whilst, and he turned to me and said "you are a nutcase. <grin> Who
uses that word in day to day conversation.....blah, blah, blah...most people
don't even the word exists."

So of course I replied, "well, yes I'm a nutcase, however, the context of
the sentence demanded that I use whilst." <grin>

So I'm over on CF-Talk looking for something and I came across this post by
Will Swain:

"What I want to know is this. How would I look at changing this so that ****
whilst ***** turd would be picked up and returned as ****, saturday is
not??" (the thread is about masking profanities)

**** doing a little dance, throwing footballs at Howie... ******

<grin>

Erika
(with a whilst)

"I love deadlines. I like the whooshing sound they make as they fly by." -
Douglas Adams (1952 - 2001)
--------------------------------------------------------------

-----Original Message-----
From: Will Swain [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 8:56 AM
To: CF-Talk
Subject: profanity checker(again)


Hi all,

I emailed the list regarding this a few weeks ago, but an interesting
problem has now come up.

I have some code that pulls a list of profanities from a db table, then
checks them against a form feild submitted by a user. Any words that match
are asterisked out. All well and good. But, when someone entered Saturday,
the code returned Sa****ay!! Yers, turd is in the database! What I want to
know is this. How would I look at changing this so that whilst turd would be
picked up and returned as ****, saturday is not??

Any ideas? Code is below.

TIA

Will

<cfset bodytext = Form.thread_body>

<cfset titletext = Form.thread_title>

 <!--- Pull out all the bad words from the database --->

<cfquery name="getprofanities" datasource="#APPLICATION.chatdsn#">
        SELECT ID, badword, rate1
        FROM tbl_profanity
</cfquery>

<!--- Loop over the profanity list and compare with words in the
bodytext --->

<cfloop query="getprofanities">

        <cfset bodytext = ReplaceNoCase(bodytext, "#getprofanities.badword#",
"#getprofanities.rate1#", "ALL")>

        <cfset titletext = ReplaceNoCase(titletext, "#getprofanities.badword#",
"#getprofanities.rate1#", "ALL")>

</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-community@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to