From: "Y. NOBUOKA" Date: 2011-01-24T19:30:32+09:00 Subject: Re: How to convert letters to uppercase? Hi, Richard When the string doesn't contain a period, you want to change all letters to uppercase? or not? If you want to do, the following code is not good for you: > str.sub!(/\A.*?\./) { $&.upcase } str = "hello" str.sub!(/\A.*?\./) { $&.upcase } puts str # hello Please use the following regexp instead: str.sub!( /\A[^\.]*/ ) { |s| s.upcase } str = "hello" str.sub!( /\A[^\.]*/ ) { |s| s.upcase } puts str # HELLO Regards, -- 信岡 ゆう (NOBUOKA Yu)