Sebastian Hungerecker
2/27/2008 7:21:00 PM
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