From: "Joec_49@..." Date: 2011-10-06T09:51:29+09:00 Subject: Re: Need some help with regexp $& works fine also Joe Sent from my iPad On Oct 4, 2011, at 2:04 AM, Robert Klemme wrote: > Please do not top post. > > On Mon, Oct 3, 2011 at 6:42 PM, Joec_49@hotmail.com wrote: >> $~ has the matched result from the most recent regexp. Convert to a string thusly >> >> ($~).to_s > > You're point being? Why would I bother to use $~.to_s if I can > directly use $& and get the same? Also, my point was specifically > that you can get away without those global variables and instead use > what String#[] returns. > >> Joe >> >> Sent from my iPad > > Maybe you had better used a real computer. > > Cheers > > robert > > -- > remember.guy do |as, often| as.you_can - without end > http://blog.rubybestpractices.com/ > >