From: Michael Fellinger Date: 2008-02-24T18:21:35+09:00 Subject: Re: difference between StringScanner#scan and Regexp#match On Sun, Feb 24, 2008 at 4:44 PM, makoto kuwata wrote: > Michael Fellinger wrote: > > input = 'foo 123' > > if (input =~ /\d+/) == 0 > > p $& # doesn't happen > > end > > thank you Michael, but it is slow and not efficient, especially input > string is long, I think. You are right of course, but i don't know any other way, =~ is about as fast as you can get already without modifying the regular expression. > > -- > regards, > makoto kuwata > >