Use on Mobile App or WebApp
Last updated
Last updated
The Replace feature in Auto Forward Bot allows you to modify message content before it is forwarded. This is particularly useful when you want to:
Customize forwarded messages to match your target audience.
Remove sensitive or unwanted information.
Add consistent branding or formatting.
With the replace feature, you can define rules to substitute specific text within messages.
This feature will not work if you enable "Show Header Forwarder" in task list
Open the Auto Forward mobile app.
Go to the Dashboard.
Tap on the Replace icon (highlighted below).
On Web Dashboard
Log in to the Auto Forward Web Dashboard.
In the left-hand menu under Features, click on Replace.
Next Tap on the Add New button (as shown in the image below):
The Create Replace feature allows you to define rules to modify message content before forwarding. It supports various replace types, including Basic, Regex, and advanced options for removing or keeping specific lines.
When creating a replace rule, you can choose a Replace Type from the dropdown menu:
Basic
Replace specific words or phrases.
Use Regex
Use Regular Expressions (Regex) for advanced replacements.
Remove Empty Lines
Automatically remove all empty lines.
Remove Lines By Keywords
Remove lines containing specific keywords.
Remove Lines By Line Number
Remove lines based on their line numbers.
Replace Power
A powerful feature that combines multiple syntaxes and supports Regex to remove or replace keywords.
Keep The Line Containing The Keyword
Only keep lines containing specific keywords.
Follow these steps to create a replace rule:
In the Replace Type dropdown, select the desired type (e.g., Basic, Use Regex, Remove Empty Lines).
Example:
For simple word replacement, select Basic.
For advanced patterns, select Use Regex.
Label (Required):
Enter a name for your replace rule. The label must meet the following guidelines:
Length: Less than 20 characters.
Characters: Only letters (a-z), numbers (0-9), hyphens (-), and underscores (_).
Case-Insensitive: example
and Example
are treated the same.
No Whitespace: Spaces are not allowed.
Examples of valid labels:
replace_rule_1
clean-text
filter2024
Full Content Original (Optional):
Paste the full message content to preview or test matches.
Original Words (Required):
Insert the exact word, phrase, or regex pattern you want to replace.
New Words Replace (Required):
Insert the new text to replace the original content.
(Optional) Apply For Task:
Specify the task or forward rule this replace rule will apply to (leave blank for all tasks).
Click Create Replace to save the rule.
The rule will now be listed under the Replace section.
Replace simple words or phrases with new content.
Use Case
Original Text
New Text
Result
Replace "black" with "white"
black
white
I like white.
Remove the word "do not"
do not
(Leave blank)
I like black.
Replace "under the moon"
under the moon
on the sun
Sometimes I lay on the sun.
Steps to Use in App:
Select Basic as the Replace Type.
Enter:
Original Words: Text to be replaced (e.g., "black").
New Words Replace: Replacement text (e.g., "white").
Save the rule.
The Regex Replace feature allows you to perform advanced message replacements using Regular Expressions (Regex). Regex is a powerful tool for matching and manipulating text patterns in messages, making it ideal for complex tasks like removing URLs, mentions, or specific patterns.
Using Regex Replace requires a basic understanding of Regular Expressions (Regex). If you are not familiar with Regex, itâs recommended to:
Start with simpler replacements using Basic Replace.
Learn basic Regex patterns for common use cases.
Use Case: Replace the words "good" or "perfect" with "bad".
Input:
Original Words: (good|perfect)
New Words Replace: bad
Example Message:
Result:
Use Case: Replace all URLs or mentions (e.g., @username
or https://example.com
) with "@Auto_Forward_Bot".
Input:
Original Words: (@|www|https?)\S+
New Words Replace: @Auto_Forward_Messages_Bot
Example Message:
Result:
Use Case: Remove unwanted phrases like "âī¸TPA trading report" and "The monitoring will be continued".
Input:
Original Words: (?:.*)(BUY|SELL)(.*)\n(?:.*)
New Words Replace: \1\2
Example Message:
Result:
Use Case: Replace "Take profit (1|2|3) at" with "TP".
Input:
Original Words: ^(Take\sprofit\s\d(?:âĄī¸|đ)at)t
New Words Replace: TP
Example Message:
Result:
Use Case: Reformat reports with a new structure.
Input:
Original Words: (?:.#)(.)\s+(?:.Long.,\s+(\w+)(?:.))\n+(?:Entry.)\s+(\d+.?\d+)\s+(?:SL.-)(?:.)\s+(\d+-\d+)(?:%)\n+(?:.:)\n(?:.)\s+(\d+.?\d+)(?:.)\n(?:.)\s+(\d+.?\d+)(?:.)\n(?:.)\s+(\d+.?\d+)(?:.)\n(?:.)\s+(\d+.?\d+)(?:.*)
New Words Replace: \1 Binance futures\nLEVERAGE CROSS \2\nBUY \3\nSELL: \5 \6 \7 \8\nSTOP: \4%
Example Message:
Result:
Use Basic Replace for simple word or phrase replacements.
Use Regex Replace for advanced patterns like URLs, mentions, or multi-line formatting.
Test your Regex rules on sample messages to ensure accuracy.
To remove content, leave the "New Words Replace" field blank.
The Replace Power feature is an advanced tool that allows you to apply multiple replacement rules at once. You can combine both Simple Replace and Regex Replace to remove or replace complex patterns in a single operation.
Apply multiple replacement rules simultaneously.
Support for Simple Replace (basic words/phrases).
Use Regex for advanced text modifications.
Each syntax rule corresponds to one line.
Replace Power allows you to add multiple replacement rules.
For example:
Rule 1 (Simple Mode):
Original Words = 2+1=3
â Replace Words = 2+2=4
Rule 2 (Regex Mode):
Original Words = (@|www|https?)\S+
â Replace Words = @Auto_Forward_Messages_Bot
Rule 3 (Simple Mode):
Original Words = url:tag
â Replace Words = customer
Shortcodes allow you to dynamically insert message details like sender names, message IDs, and original text when creating replacement rules. These shortcodes can be used across all Replace Types, including Basic, Regex, and Replace Power.
Shortcodes can be used in the following Replace Types:
Replace Type
Description
Basic
Replace simple words or phrases with static or shortcode values.
Use Regex
Use Regular Expressions (Regex) combined with shortcodes for dynamic results.
Replace Power
Apply multiple replacement rules with shortcodes in a single operation.
These shortcodes allow you to dynamically include attributes from the message source:
Shortcode
Description
[[FULL_TEXT]]
Replaces the full content of the original message.
[[ORIGIN_USERNAME]]
Sender's username.
[[ORIGIN_USERID]]
Sender's user ID.
[[ORIGIN_TEXT]]
The original message text.
[[ORIGIN_NAME]]
Sender's display name or channel name.
[[ORIGIN_POST_ID]]
The ID of the original post.
[[ORIGIN_CHAT_ID]]
The ID of the originating chat.
[[ORIGIN_QUOTED_TEXT]]
The quoted text from the original post.
[[ORIGIN_NAME_URL]]
The link associated with the original sender's name.
[[FROM_USER]]
The username of the message sender.
[[SOURCE_NAME]]
The name of the forwarded source.
[[SENDER_CHAT]]
The display name of the sender.
[[FORWARD_FROM_CHAT]]
The name of the original message owner.
Replace Type: Basic
Original Words: [[FULL_TEXT]]
New Words Replace: Hello! This message was forwarded by [[SOURCE_NAME]].
Original Message:
Result:
Replace Type: Basic
Original Words: Hi
New Words Replace: Hi - Sent by [[ORIGIN_NAME]] ([[ORIGIN_USERID]])
Original Message:
Original Message:
Result:
The Remove Lines Without Keywords feature allows you to keep specific lines from a message that contain certain keywords. Any line without the keywords will be removed from the final result. This feature is especially useful for filtering message content to keep only relevant information.
You specify one or more keywords.
The feature will scan each line of the message.
Only lines containing the keywords will be kept.
Choose Keep Lines with Keywords as your Replace Type.
Configure the rule:
Enter Keyword
Tap + New Keyword to add multiple keywords.
Example Keywords:
BUY
Take
Profit
risk size
Tap Save to apply the rule.
Keywords: BUY,Take Profit,risk size
New Words Replace: KEEP
Only lines containing the specified keywords (BUY
, Take Profit
, or risk size
) will be kept:
The Remove Lines by Keyword feature allows you to remove lines from a message if they contain one or more specific keywords. This feature helps you filter out irrelevant or unwanted lines while keeping the rest of the content intact.
You provide keywords to match lines in the message.
If a line contains any of the specified keywords, it will be removed from the final output.
Steps to Use the Feature
Enter the keywords that will be used to identify and remove lines containing them.
Tap + New Keyword to add multiple keywords.
Example Keywords:
Market
Notes
risk size
Market
Notes
risk size
Lines containing the keywords "Market", "Notes", and "risk size" will be removed:
The Remove Empty Lines feature allows you to clean up messages by removing all blank or empty lines. This ensures your forwarded content is clean and well-formatted.
All empty lines are removed, and the content becomes:
The Remove Lines By Line Number feature allows you to specify which lines in a message should be removed based on their line order. This is particularly useful when you need to clean up messages by eliminating unnecessary lines.
In the Replace Type dropdown menu, select Remove Lines By Line Number.
Configure the Rule
Label:
Enter a descriptive name for your rule.
Example: remove_line_2_5
.
Line Order:
Enter the specific line numbers you want to remove.
Use commas (,
) to separate multiple line numbers.
Example: 1,3,5
(to remove lines 1, 3, and 5).
Optional: Apply For Task:
Select a specific task to apply this rule.
Label: remove_line_2_5
Line Order: 2,5
Lines 2 and 5 are removed from the message:
The Replace feature allows you to apply or disable specific replacement rules for tasks. This guide will show you how to manage Replace rules, enabling them for individual tasks or across all tasks.
From the Dashboard, select the Replace feature.
You will see a list of all previously created Replace rules.
Locate the Replace rule you want to manage.
Tap or click on the rule.
A popup window will appear, showing details of the selected Replace rule (as seen in the second image).
In the popup window, you will see the following options:
Activate/Deactivate For Task (Green Button)
Use this option to enable or disable the Replace rule for a specific task.
If the Replace rule is already active for the task, clicking this will deactivate it.
If the Replace rule is inactive, clicking this will activate it.
Apply For All Tasks (Blue Button)
This option allows you to apply the Replace rule to all existing tasks.
Use this feature when you want the Replace rule to take effect globally across all your tasks.
Edit Replace (Orange Button)
Tap this option to edit the Replace rule.
You can update the label, Replace syntax, or any other details of the rule as needed.
Delete (Red Button)
Use this option to delete the Replace rule permanently.
Be cautious, as this action cannot be undone.