From: daz Date: 2005-11-14T08:37:16+09:00 Subject: Re: question of regexp select Tom Reilly wrote: > Regexp error? > Page 538 Programming Ruby > > m = /(.)(.)(\d+)(\d)/.select("TXH1138: The Movie") > p m.to_a > > > rb_tmp.rb:1: private method `select' called for /(.)(.)(\d+)(\d)/:Regexp > (NoMethodError) > >Exit code: 1 > > > Why should there be a NoMethodError for select? > There's no method Regexp#select, AFAIK. PickAxe I shows: m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie") p m.to_a #-> ["HX1138", "H", "X", "113", "8"] Is that a second edition misprint? daz