If I follow you, what you're describing isn't filtering, it's processing. In other words, you're picking out multiple entries and replacing them with a custom template. That's not what regex does on it's own, afaik.