From: Alain FELER Date: 2006-02-06T07:08:20+09:00 Subject: regex trick I want to replace all ' by \' ? (I need it to do inserts in mysql). > s = "j'ai" > s.gsub!(/'/,'\'') > p s ==> gives j'ai and not j\'ai as I want Thanks for help.