Replace or Remove Text
Replace words or phrases, or remove them from the final forwarded message.
Change the message before it arrives
Use Replace or remove text when you want the forwarded message to look a little different from the original. You can swap a word, update a link, or remove an unwanted phrase before the message reaches its destination.
Replace a word or fixed phrase
Choose TEXT when you know the exact word or sentence you want to change. By default, ForwardMsg looks for that text exactly as you write it.
For example, if source messages say Bitcoin and you want recipients to see BTC, create a rule like this:
| Field | Enter |
|---|---|
| Match Type | TEXT |
| Text to Match | Bitcoin |
| Replace With | BTC |
To remove a fixed phrase instead, put the phrase in Text to Match and leave Replace With empty. For example, matching — shared from our partner with an empty replacement removes that line from the final message.
Replace a link that changes
Choose REGEX when the part you want to change is not always identical. Regex is simply a way to describe a pattern: for example, “any Telegram channel link,” even when the channel name changes.
Imagine messages arrive with links such as:
Join https://t.me/market_updates today
Join https://t.me/daily_signals?start=inviteTo replace each of those links with your own Telegram link, create this rule:
| Field | Enter |
|---|---|
| Match Type | REGEX |
| Search Pattern | https?://t\.me/[A-Za-z0-9_/-]+(?:\?[^\s]+)? |
| Replace With | https://t.me/your_channel |
The pattern finds a Telegram link even when its channel name, post path, or link parameter is different. The delivered message will use https://t.me/your_channel instead. Enter the pattern as shown—without adding / characters around it.
Before and after
| Original | Rule | Delivered text |
|---|---|---|
Bitcoin update | Replace Bitcoin with BTC | BTC update |
News — shared from our partner | Replace the suffix with an empty value | News |
Join https://t.me/market_updates today | Telegram-link pattern above | Join https://t.me/your_channel today |
Replacement rules change the source text before Message Format builds the final message. A static footer you wrote in Message Format is not the source text these rules match.
Useful switches
- Turn on Replace All Occurrences when the same word or link should change everywhere in one message. Turn it off to change only the first one.
- Turn on Case Insensitive when
Bitcoin,bitcoin, andBITCOINshould all be treated the same. - Leave Replace With empty whenever you want to remove the matched text.
Save and check your rule
- In the automation editor, choose Global Settings for a shared rule, or click the source chat/channel you monitor to open its settings. See How Settings Work.
- Open the Formatting tab. Find Text Replacement, then click Add Rule.
- Choose TEXT or REGEX.
- Enter the text/pattern to find and its replacement.
- Click Add in the dialog to save the rule.
- Select Save Changes in the automation editor.
- Send an example through your private test chats and check the copied message.
Use a private test route to try a rule as many times as you need without waiting for a message in the original chat.
Frequently Asked Questions
Should I use TEXT or REGEX?
Can ChatGPT or another AI help me write a REGEX rule?
Why does my rule not match the text I see?
**Bitcoin** for bold, *Bitcoin* for italic, or [Join](https://example.com) for a link. A TEXT rule for Bitcoin still matches that word inside **Bitcoin**; include the Markdown characters when you want to match the entire formatted text or link. Test the rule in a private test route to see exactly what changes. Feel free to reach out for support.