filter: add methods for generic filtering with regexes.