There are 3 ways to replace links, depending on your task:
Expert bundle
→ Use the “Replace links to source" setting - the "Replace everything (both links to the source and links to messages)" option
This setting automatically replaces any cross-links in posts and does not require manual configuration. A cross-link is a link within a chat to another message from that chat (1) or to the chat itself (2). Replacing cross-links allows you to link not to the messages in the source channel, but to your chat.


→ Use replacements with regular expressions. For example, if the original message has a clickable link to the source at the bottom, you can only change it through replacement.


Replacing channel mentions via @username:

If you need to process not all links, but only one specific link or signature, you first need to determine how exactly it looks to the bot.
Write the command /track in the @junction_bot chat; then link to the original message with the unwanted link.
Example of an embedded HTML link: <a href="https://www.junctionbot.io">Best bot</a>
Specify new text or a new link.
Example:
Source: <a href="https://www.junctionbot.io">Best Web bot</a>
RE (Regular Expression): no
New value: <a href="https://t.me/junction_bot?start=_tgr_0SteatVkZjQy">Best Telegram bot</a>



Let us remind you that if you want everything posts containing links should be filtered, not replaced, read this article.