how can i prevent clients of my web site send curses and dirty words?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/24515/bad-words-filter">&ldquo;bad words&rdquo; filter</a>  </p>
</blockquote>



<p>In my web application i have a section which gets input from the user and posting it on the main page.</p>

<p>i would like to prevent post in dirty language. </p>

<p>Is there any research about it or a library in php that detects most of the curses and dirty expressions in English.</p>

<p>shortly speaking i would like to test the input in that manner;</p>

<pre><code>if the input in the set of the unwanted patterns 
      dob't publish it
else
      publish it on the main wall
</code></pre>
