From: Sebastian Hungerecker Date: 2008-02-28T04:20:56+09:00 Subject: Re: Aliasing, and another regex question J. Cooper wrote: > I was really hoping I could do it in one line Well, you can do it in one line just not with a single regex (or maybe you can do that too, but that'd probably more complicated and possibly longer): lines.select {|l| l =~ /foo/ && l !~ /bar/} HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826