From: Phrogz Date: 2007-02-15T00:40:09+09:00 Subject: Re: Puzzling regex behaviour On Feb 14, 8:17 am, Ian Macdonald wrote: > As you can see, interactively irb returns nil for that first regex match. Aren't you making the assumption that it's the regex at fault here, and not the encoding of the string when you enter it in irb? What if you do: gavinkistner$ cat set_foo.rb $foo = "pr�f�r�s" gavinkistner$ irb irb(main):001:0> load 'set_foo.rb' => true irb(main):001:0> $foo =~ /[^[:alnum:]]/ ???