From: J-H Johansen Date: 2008-05-29T17:47:59+09:00 Subject: Strings, postgresql and gsub Hi, I'm somewhat stumped at the moment due to problems with inserting strings in postgresql containing 's. Normally, I'd just add a \ to escape the ' and everything would be just fine. But for some reason, Ruby won't let me do this. ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux] irb(main):033:0* s = "blah'blah" => "blah'blah" irb(main):034:0> s.gsub(/'/, "\\'") => "blahblahblah" irb(main):035:0> s.gsub("'", "\\'") => "blahblahblah" I've seen myself blind on this one ...and I still can't see where the problem is. Any clues ? -- J-H Johansen -- There are 10 kinds of people in the world: Those who understand binary and those who don't...