Andrew Gwozdziewycz wrote:

> I think he may be referring to "bad" words, and 'filthy' language. At  
> least that's what i got from the question.
> There are many PHP implementations on the web, which could be adapted  
> to python fairly easily. Most of which are probably not the most  
> ideal solution and
> involve alot of stuff like
> 
>        for n in badwords:
>              texttofilter.replace(n, '<bad word deleted>')
> 
> If that's all you need though, maybe it's not so bad.

This is a no-op, since it replaces the text, but then discards it.  You 
meant:

        for badWord in badWords:
            textToFilter = textToFilter.replace(badWord, '<)!&%(#&)%>')

-- 
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   If anything is sacred, the human body is sacred.
   -- Walt Whitman
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to