From: Aisha Fenton Date: 2010-09-08T19:56:43+09:00 Subject: Re: Regex breaks when string contains binary data Hi Brian, Output those IRB statements for me is: >> RUBY_VERSION => "1.8.7" >> RUBY_DESCRIPTION => "ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]" >> puts "345HI".match(/HI|BYE/).inspect # => nil >> puts "\345HI".match(/HI|BYE/).inspect nil => nil >> puts "\345KI".match(/HI|BYE/).inspect nil => nil >> "\345HI" =~ /HI|BYE/ => nil >> "\345HI".bytes.to_a => [229, 72, 73] And I'm not running any dodgy irb plugins, such as wirble. -- Posted via http://www.ruby-forum.com/.