plugin_strings

Search and Replace text

Given a text, it allows you to perform one or more search and replacement operations.

Text Operations Action


The Search and Replace Text integration in Botize allows you to automate text modifications using custom search and replace rules, including regular expressions. This is ideal for tasks such as updating links, removing specific words, or transforming text formats.

With this tool, you can define multiple replacement rules and apply them sequentially, ensuring that your texts are tailored to your specific needs without manual intervention. Additionally, it offers practical examples and customization options to facilitate its implementation in your automations.


  • Accepts regular expressions.




Customization Options

Configurable fields you can adjust in your automation

  • Rules
  • Run this step only if the following rules are met
  • Replacement Rules
  • Playground

Regular Expression Examples

The following table contains a list with examples of regular expressions for different cases.

Case sensitive match with case sensitive replacement

Pattern text
Replacement TXT
Example text 1. Text 2. TEXT 3
Result TXT 1. Text 2. TEXT 3

Case insensitive match with case sensitive replacement

Pattern /text/i
Replacement TXT
Example text 1. Text 2. TEXT 3
Result TXT 1. TXT 2. TXT 3

Replaces the 'tag' value of a URL

Pattern /(&|\?)tag=[^&\s]*/
Replacement $1tag=NEW-21
Example https://amazon.com?tag=OLD-21&psc=1
Result https://amazon.com?tag=NEW-21&psc=1

Delete any link to the ABC or CDE domain

Pattern /(https?:\/\/)?(www\.)?(abc|cde)\.(.[^\s]*)/i
Replacement
Example https://abc.com
http://www.cde.com
https://fgh.com
Result https://fgh.com

Delete all text starting from the word 'green', inclusive, case-insensitive

Pattern /\bGREEN[\s\S]*/i
Replacement
Example red green blue
Result red

Convert Amazon URLs to Affiliate Links

Pattern /(amazon.es|amazon.com)\/(gp\/product|[^\/]*\/dp|dp)\/([^\/\?]*)(\/[^\s]*|\?[^\s]*)?/
Replacement $1/$2/$3/?tag=mytag-21
Example https://amazon.com/tshirt/dp/B09V5B7W7P/ref=sr_1
Result https://amazon.com/tshirt/dp/B09V5B7W7P/?tag=mytag-21

Replace multiple spaces with a single space

Pattern /\s+/
Replacement (Indicate a space here)
Example red    green          blue
Result red green blue

Replace multiple words with a single one

Pattern /\b(red|blue)\b/ig
Replacement COLOR
Example red green blue
Result COLOR green COLOR




Information provided

When executed, this operation delivers the following data, which can be used in the same automatic task.

  • Tags

  • Matches found {{matches_found}}




Write us

By email or by Telegram.
Monday to Friday from 7 a.m. to 1 p.m. (Spain).

Let's talk

Choose day and time.
We share the screen and answer all your questions.