On Fri, Nov 09, 2001 at 01:57:05PM +0900, Jos Backus wrote:
> lizzy:/tmp# cat x
> a = %w{aap noot mies}
> p a.grep(/a/)
> lizzy:/tmp# ruby x
> ["aap"]

The find_all, select and reject methods all function as replacements indeed.
The

    p %w{aap noot mies}.grep(-/a/)  # => ["noot", "mies"]

mechanism is especially neat and shows the power of Ruby really well. I wish I
could come up with gems like these.

Many thanks for these great suggestions and examples!

-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb / cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;