Yukihiro Matsumoto wrote: > on Sat, 17 May 2008 06:10:05 +0900, DJ Jazzy Linefeed > <john.d.perkins / gmail.com> writes: > > l.gsub!('\n', ' ') [snip] > Regular expression operation does not work fine on broken strings. It An off-topic question: So String#gsub always use the regexp engine (even if the pattern is a plain string). Now, Is there a way, in Ruby, to do search/replace that don't involve the regexp engine? I'm asking this because I figure that not using the regexp engine would be faster (but maybe it'll be only marginally faster, I don't know). I know one can do... s[ 'find' ] = 'replace' ...but it replaces only one occurance the the substring (and does it skip the regexp engine?). -- Posted via http://www.ruby-forum.com/.