From: Aisha Fenton Date: 2010-09-08T17:42:07+09:00 Subject: Regex breaks when string contains binary data Hi, I can't see why the following Regex isn't working as expected. Maybe a bug in ruby? puts "345HI".match(/HI|BYE/).inspect > HI puts "\345HI".match(/HI|BYE/).inspect > nil What I expected was the second regex to find "HI" in the string too. Why I need this, is that I'm printing data to stdout that will contain some binary characters, and I'm using a regex to escape the newline characters that it maybe contains. I'm using Ruby 1.8.7 Thanks, Aish -- Posted via http://www.ruby-forum.com/.