Thomas B. wrote: > The backslash has a special meaning in gsub. Use str.gsub("'", "\\\\'") > instead. Thanks, that helped me. -- Posted via http://www.ruby-forum.com/.