From: Mark Hubbart Date: 2005-11-14T17:30:27+09:00 Subject: Re: question of regexp select On 11/13/05, daz wrote:>> 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")>>>> Is that a second edition misprint? 538 is the section on MatchData, which has a #select. Regexp has no#select method. cheers,Mark