From: "Torsten RĂ¼ger" Date: 2002-08-26T21:49:59+09:00 Subject: Newbie Regexp question Moi, I'm new to ruby and even to regular expression, so I fear these might be super simple. 2 Questions I have a string (actually a java inner class file name) like >name = "com.foo.Outer$Inner.class" and want to replace $ with \$ (for the shell) >name.sub!(/\$/,"\\\$") doesn't work while >name[\$/] = "\\\$" does. And the other one is with a line (from a config file) like line = "option.name = "value 1" "value 2" " and I'd like an expression that 1 gets me the stuff after the = , and whatever I do the = is always part of the result 2 an expession that I could use with split that gets an array [ "option.name","value 1" , "value 2"] Thanks Torsten