You can have 2 columns in a sql table - offensive word and what you want it
replaced by eg would be ass (WordToReplace) and a** (ReplaceBy)
then you can get that data in your code and loop through the rows and
replace the offensive word (if found in the input text) and replace it with
what you want it replaced with.
So user enters "you are an ass" then
foreach (DataRow badWord in badWordsDataTable)//get the data loop going
{
//say userInput is the string that contains the user input
userInput = userInput.Replace(badWord["WordToReplace"],
badWord["ReplaceBy"]);
}
HTH
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...
http://www.swanandmokashi.com/ http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
"Sam" <as****@yahoo.com> wrote in message
news:u9**************@TK2MSFTNGP04.phx.gbl...
Hi all,
I have feedback page which allows users to submit input text. Is there a
way to filter out offensive language (some kind of validation check), say
I have a list of words in a table that I want to check against. Any help
would be greatly appreciated.
Regards,
Sam
--
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 898 spam emails to date.
Paying users do not have this message in their emails.
Try
www.SPAMfighter.com for free now!