filtering topics with provided pattern