biglist !~ /bar/
!biglist.grep(/bar/)
On Fri, 13 Jan 2012 00:15:24 +0900, Matt Lawrence wrote:
> A bit of syntax that I have never picked up. How do I use grep to
> exclude entries in a list?
>
> biglist.grep(/foo/) # get all entries containing foo
> biglist.grep(????) # get all entries that do not contain bar
>
> -- Matt
> It's not what I know that counts.
> It's what I can remember in time to use.