From: Tobias Reif Date: 2001-10-25T18:35:31+09:00 Subject: [ruby-talk:23278] Re: Bruce Eckel's opinion of Ruby Michael Neumann wrote: >>> # $_ = "...reinventing" >>> sub(/re/, //) >>> # puts >>> >> >>C:\>ruby -e 'print "reinventing".sub!(/re/,//)' >>#inventing >>C:\>ruby -e 'print "reinventing".sub!(/re/,"")' >>inventing >> > > maybe even better is: > > $ echo "reinventing" | ruby -pe "sub /re/, ''" > inventing Why better? (I just posted the above because I thought we don't want inventing but inventing ) Tobi -- Tobias Reif http://www.pinkjuice.com/myDigitalProfile.xhtml go_to('www.ruby-lang.org').get(ruby).play.create.have_fun http://www.pinkjuice.com/ruby/