From: Ralph Shnelvar Date: 2009-11-10T17:26:43+09:00 Subject: Re: camelize Phrogz, What does the "i" do in gsub(/\b[a-z]/i){ |x| x.upcase } do? I took it out and the pattern seemed to work. Ralph Monday, November 9, 2009, 10:10:07 PM, you wrote: P> On Nov 9, 1:43�am, Sijo k g wrote: >> Hi >> � � I would like to get output as �"Re-Open" �for the input "re-open" >> And I tried >> "re-open".camelize � � � � => �"Re-open" >> >> � � �Could you please tell how can I do this? irb(main):001:0>> s = "re-open" =>> "re-open" irb(main):002:0>> class String; def simple_titleize irb(main):003:2>> gsub(/\b[a-z]/i){ |x| x.upcase } irb(main):004:2>> end; end =>> nil irb(main):005:0>> s.simple_titleize =>> "Re-Open" -- Best regards, Ralph mailto:ralphs@dos32.com