Support filtering with -g (grep).