From: Martin DeMello Date: 2011-01-24T03:11:16+09:00 Subject: Re: How to convert letters to uppercase? On Sun, Jan 23, 2011 at 11:24 PM, Richard Sandoval wrote: > Im unfamiliar with regular expressions. > > How would I be able to change all letters to uppercase to the first > period? > > Before: > > helpuser01.hello.txt > > > After: > > HELPUSER01.hello.txt ruby-1.9.2-p0 > a = "helpuser01.hello.txt" => "helpuser01.hello.txt" ruby-1.9.2-p0 > a.sub(/.*?\./) {|m| m.upcase} => "HELPUSER01.hello.txt" martin