On Sat, 27 Nov 2004 06:10:55 +0900
James Edward Gray II <james / grayproductions.net> 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?
> 
> James Edward Gray II
> 
> 

Ah, I thought this behaviour was wanted. If this is not wanted my whole optimization was in vain. :(

Regards,

Brian

-- 
Brian Schröäer
http://www.brian-schroeder.de/