From: Albert Schlef Date: 2010-01-27T06:46:44+09:00 Subject: Re: Why does Regexp::escape backslash spaces?!? Marnen Laibow-Koser wrote: > irb(main):001:0> Regexp::escape('a b') > => "a\\ b" > > Why? This doesn't seem to make any sense. Is it a bug? Maybe spaces are escaped so the resulting string be compatible with an "extended" pattern, where non-escaped spaces are ignored: / (\w+) \s (\w+) /x is the same as: /(\w+)\s(\w+)/ -- Posted via http://www.ruby-forum.com/.