How to remove Bad Words in C#

public string RemoveBadWords(string UserComments, ArrayList BadWordsList)
{
   Regex regBad = default(Regex);
   IEnumerator ieBadWords = BadWordsList.GetEnumerator();
   while (ieBadWords.MoveNext())


   {
      regBad = new Regex(”\\b” + ieBadWords.Current.ToString());
      UserComments = regBad.Replace(UserComments, “yourtext”);
   }
   return UserComments;
}


by admin on May 27th, 2009 in ASP.Net

There are no comments.

Name*: Website: E-Mail*:
XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>