From: Dominik Werder Date: 2003-06-11T06:54:46+09:00 Subject: Re: Regexp question > Unfortunately, not only are double backslashes converted to a single > backslash when the string is parsed, but an additional substitution pass > is > made by sub() which also converts double backslashes to single > backslashes, > as well as interpreting: (\1), (\2), (\3), etc., (\&), (\+), (\`), and > (\'). > So you need to pass sub() the string (\\'), which means that the literal > must be "\\\\'" (or even worse, '\\\\\''): > > my_string.gsub("'","\\\\'") > > I hope this helps! Yes, this explains alot !! bye! Dominik