"Robert Klemme" <bob.news / gmx.net> writes: > "Tom Counsell" <tamc2 / cam.ac.uk> schrieb im Newsbeitrag > news:193f68dcbb7799e1110cab8eb7a02248 / cam.ac.uk... >> Hello >> >> I'm a little confused and would appreciate your help. I would like to >> remove any \ characters from a string as well as some other characters. >> > > You're abusing String#tr - this method is intended to replace single chars > by other single chars. That you can remove characters is a special case > with empty replacement strings. You really should be using gsub or gsub!: > >>> 'b\\c'.gsub /\\/, '' > => "bc" String#delete exists. > robert -- Christian Neukirchen <chneukirchen / gmail.com> http://chneukirchen.org