On Jun 12, 1:26 pm, yitzhakbg <yitzha... / gmail.com> wrote: > Sorry, You didn't understand. The class name can be anything. Whatever > it is, I want the first changed to upper case. If you can show me how > to do it in Sed, that's fine. I found it messy and tried writing a > Ruby script. It also came out a little messy. Can you help me? Take your pick: class String def upcase_first_letter_1 new_str = self.dup new_str[ 0 ] = new_str[ 0..0 ].upcase new_str end def upcase_first_letter_2 self.sub( /./ ){ |c| c.upcase } end def upcase_first_letter_3 self.sub( /[a-z]/i ){ |c| c.upcase } end end %w| orgController _orgController |.each{ |n| p n.upcase_first_letter_1, n.upcase_first_letter_2, n.upcase_first_letter_3 } #=> "OrgController" #=> "OrgController" #=> "OrgController" #=> "_orgController" #=> "_orgController" #=> "_OrgController"