From: Michael Neumann Date: 2001-10-24T23:23:44+09:00 Subject: [ruby-talk:23193] Re: Bruce Eckel's opinion of Ruby David Alan Black wrote: > On Wed, 24 Oct 2001, Tobias Reif wrote: > > > David Alan Black wrote: > > > > > Hello -- > > > > > > On Wed, 24 Oct 2001, Paul Brannan wrote: > > > > > > > > >>I also find myself reinventing the wheel in Ruby a lot, because some > > >>library doesn't exist for Ruby or it doesn't work the way I want it to. > > >> > > > > > > s/re// # in the circumstances you're describing :-) > > > > > > I don't understand that. What's your point? > > > Simply that if Ruby doesn't already have a (working) library of a given type, > then Paul is *inventing* the wheel, not reinventing it. More technically: s/re// is a Perl regular expression, substituting "re" with "". In Ruby you would say instead: # $_ = "...reinventing" sub(/re/, //) # puts Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de