# New blog: 🎄 Twelve Days of SMT 🎄 - Day 4: RegExRouter

**URL:** <https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-4-regexrouter/348>\
**Category:** Kafka Connect\
**Created:** [11 December 2020 16:49 UTC](https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-4-regexrouter/348 "2020-12-11T16:49:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [11 December 2020 16:49 UTC](https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-4-regexrouter/348/1 "2020-12-11T16:49:37Z")

</div>

If you want to change the topic name to which a source connector writes, or object name that’s created on a target by a sink connector, the RegExRouter is exactly what you need.

To use the Single Message Transform you specify the pattern in the topic name to match, and its replacement. To drop a prefix of test- from a topic you would use:

" transforms " : " dropTopicPrefix " ,

" transforms.dropTopicPrefix.type " : " org.apache.kafka.connect.transforms.RegexRouter " ,

" transforms.dropTopicPrefix.regex " : " test-(.\*) " ,

" transforms.dropTopicPrefix.replacement " : " $1 "

* * *

**Read more:** [🎄 Twelve Days of SMT 🎄 - Day 4: RegExRouter](https://rmoff.net/2020/12/11/twelve-days-of-smt-day-4-regexrouter/)

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [9 February 2021 13:29 UTC](https://forum.confluent.io/t/new-blog-twelve-days-of-smt-day-4-regexrouter/348/2 "2021-02-09T13:29:16Z")

</div>


