James Edward Gray II wrote:
> On Nov 26, 2004, at 2:38 PM, Brian Schröäer wrote:
> 
>> Hello Group,
>>
>> I propose using
>>
>>   def clean?( text )
>>     @clean_calls += 1
>>     @banned_words.each do |word|
>>       return false if text.include?(word)
>>     end
>>     true
>>   end
>>
>> in the test filter, because my solution does not work with swedish 
>> characters. Trying it with wswedish gives errors when using the regex 
>> and no errors when using include?, so I think there must be something 
>> weird going on in the regex.
> 
> 
> Hmm, I'm bummed that regex doesn't work.  I was trying to use something 
> that would be worldly.  Maybe one of the regex gurus will jump in here 
> and correct it for us.
> 
> My complaint about String#include? is that banning the word "box" and 
> then passing in a message containing the word "boxer" will break it, right?

Maybe something like text.split.include?(word)


Hal