Robert Klemme wrote in post #1044728: > > This won't work for the general case though. You might rather want to > do something like > > irb(main):003:0> "aaa aaa".gsub(/\w+/) {|m| m.capitalize} > => "Aaa Aaa" > Thanks, Robert ! I need to cap only first alpha char on each line and there is leading space, so need to check it bit more. Dai -- Posted via http://www.ruby-forum.com/.