From: ts Date: 2002-11-03T19:40:07+09:00 Subject: Re: substitution problem >>>>> "D" == Daniel Bretoi writes: D> btw, I have this solution, but I'd like to know the thory why my other D> solution didn't work When you write >> newstr = str.gsub(/\b(\s)?([a-z])/,'\1\2'.upcase) ruby call the method #upcase for the string '\1\2' and the result is given as the second argument of #gsub '\1\2'.upcase is the same than '\1\2' Guy Decoux