From: Daniel Bretoi Date: 2002-11-03T16:18:20+09:00 Subject: substitution problem Hi All, I'd like to capitalize every word in a string. I was hoping this expression would do it: newstr = str.gsub(/\b(\s)?([a-z])/,'\1\2'.upcase) but it turns out that as \2 is not evaluated right away, the .upcase has no effect. Suggestions? db -- A.D. 1844: Samuel Morse invents Morse code. Cryptography export restrictions prevent the telegraph's use outside the U.S. and Canada.