public TopicPartitionFilter createTopicPartitionFilterWithPatternList(String topicPartitions) {
        List<String> ruleSpecs = Arrays.asList(topicPartitions.split(","));
        List<TopicPartitionFilter> rules = ruleSpecs.stream().map(ruleSpec -> {
            try {
                return parseRuleSpec(ruleSpec);
            } catch (TerseException e) {
                throw new RuntimeException(e);
            }
        }).collect(Collectors.toList());

        return new CompositeTopicPartitionFilter(rules);
    }
Creates a topic-partition filter based on a list of patterns.
Expected format:
List: TopicPartitionPattern(, TopicPartitionPattern)*
TopicPartitionPattern: TopicPattern(:PartitionPattern)? | :PartitionPattern
TopicPattern: REGEX
PartitionPattern: NUMBER | NUMBER-(NUMBER)? | -NUMBER
tools/src/main/java/org/apache/kafka/tools/GetOffsetShell.java