From: Ryan Davis Date: 2008-04-26T21:52:54+09:00 Subject: Re: Howto get array.agrep (NOT array.grep) On Apr 26, 2008, at 03:35 , Simon Krahnke wrote: >> NAME >> agrep - print lines approximately matching a pattern > > Enurable#grep can do that, if you pass it the right block. When you > pass > a block to grep it's the block's job to match the elements. no. > enum.grep(pattern) => array > enum.grep(pattern) {| obj | block } => array > ------------------------------------------------------------------------ > Returns an array of every element in _enum_ for which +Pattern > === > element+. If the optional _block_ is supplied, each matching > element is passed to it, and the block's result is stored in the > output array. The block just morphs the result, it doesn't morph the match.