Boxes - Replace Functions

Example sentence: In this example the word "appears" appears two times.

1. Text Replace

1fa3994eae285ab580e146db996e9c95.png

Impact on our example sentence: In this example the word "exists" exists two times.

Note: Every occurrence of the search term will be replaced.

2. Remove Spaces

This box can also be used to remove spaces:

76c09366a970f67e277008fcd15f1255.png

Impact on our example sentence: Inthisexampletheword"appears"appearstwotimes.

Note: The "Replace (with)" field can be left empty. In this way, unwanted words or characters will be removed and nothing will substitute them.

This box can be really helpful to remove empty spaces in your URL, where they could potentially break the link. You could also remove consecutive whitespace by entering two or more empty space in "Search" - however an easier and better way to do this is to use the specially designated "Remove Consecutive Whitespace" box.

cc48339b8d36d219e11f48726904b876.png

While the Text Replace box will delete both whitespaces, the Remove Consecutive Whitespace box will only remove the extra spaces, so as to leave one space left.

3. Remove Duplicate Words

This box removes words that appear more than once in a string.

0503b75ba8c6b08e0bfbdf1ee8bf408c.png

Enter the Delimiter separating the words if required (for example with ; or / or just white spaces).

4. Map-Replace

Instead of adding multiple Text Replaceboxes, you can replace many things simultaneously by storing one rule per line in a single Map-Replace box.

The syntax is as follows:

search term{delimiter}replace term

7b862c88955d5a96512449f1d088f577.png

Impact on our example sentence: Inthisexampletheword"exists"existstwotimes.

You can select the Case sensitivity in the dropdown underneath the input field.

Choosing the List Delimiter is helpful if the text you are replacing contains a certain character that is also a popular delimiter sign. If you want to e.g. replace http:// with https://, you would choose a delimiter that is not colon, but potentially comma: http://,https:// Choosing colon as a delimiter in this case would otherwise result in http being replaced with //.

Note: Please don't use this box with more than 500 values. If you want to replace more than 500 terms, please use our List feature.

Leaving the part after the delimiter empty will result in the search term being removed/replaced with nothing.

6d55de0194871148e4b2be9005ef95ec.png

Impact on our example sentence: In this the word "" two times.

5. Mapping

This box handles the values of an attribute as a whole. In other words an entire phrase, not just a single word, is replaced with the values you insert. You always need to add the complete string to make a replacement.

The Case dropdown lets you choose between matching case sensitive or insensitive.

Example Text: "This is blue"

Using this configuration would not have any effect at all:

e5fe58880ff70e837acdb74c9bf9ca82.png

Unchanged Result: "This is blue"

To modify this string, you would need to use this configuration:

4ad674a9c7010fa133a4f2dfc5f5dc3f.png

Result: "blue"

Note: Additional mappings can be saved in new lines, just as in the Map-Replace box.

6. Text replace if column contains

This box works similar to the Map-Replace box, but you can set a condition for replacing.

Example:

For all the product Types 1044 we want to replace the size "116- 140" by "one size".

3f0505cffb9013537c2348fc53301c2f.png

In the dropdown you can choose if the value in the column should contain or equal the value you set.

7. Replace In Between

This box can be used to remove or replace value between two other values:

Example Text:

In this example the word "appears" appears two times.

34d1d54086bda384c092e3ab8c1b9701.png

Result:

In this example the word exists appears two times.

Note: Both values in From and To will disappear.

8. Remove Terms in Brackets

This box can be used to remove values between two brackets:

708a7945e22b52471be31371e4245185.png

Example:

In this example the word (appears) appears two times.

Result:

In this example the word appears two times.

9. Text Normalization Feature

For this box, please read the article "List Normalization"

10. Replace Dynamic Value

With the box Replace Dynamic Value you replace a value taken from an other column.

If you want to replace the brand in the title by the price and the price changes, the price in the title will be changed too.

You also can replace a value taken from a column by a Static value.

Requirements You need to have a column which takes its values from an other column.

Columns which do this are often the title or the description column.

Example for the column title:

Title: Pizza fresh and delicious Dr.Ütker

a0ab420db8c210685ad02eb3207845d7.png

New Title: Pizza fresh and delicious 12,10€

Note: If you fill in the box Static value, what you wrote in Replace Column will disappear:

9a9811d75e5ac8f7e6ab63436b379d80.png

New Title: Pizza fresh and delicious today supersale

If you work with prices, you may have to use the Make Valid Price- Box before.

11. Numeric Compare

If you want to change a value in a column when it is more/less than/ the same like an other value, then use this box.

6711d8154767f2ff275203e172e5ebb0.png

1 - Chose the column, you want to compare.

2 - than chose, if your criteria is that it should be smaller or bigger than an other value:

< smaller

> greater

>= greater or the same

<= smaller or the same

== the same

!= unequal/ not the same

3 - Now select the column in which the value you want to compare is in.

4 - select, what happens if there is a match:

5 - select, what happens if there is no match:

72d6cb1db7d7ffa1d235bded5fc896a1.png

12. Compare Columns

This box works similar to the box Numeric Compare, but here you can compare not just numbers, also text.

  1. In Column A and B select the columns, you want to compare.

  2. Handle match: fill in the value you want to assign/put pre- or append if there is a match, or leave it unchanged.

  3. Handle no match: fill in the value you want to assign/put pre- or append if there is no match, or leave it unchanged.

3e160a7d0e6a84d0542df69dcf2c3de4.png

For match, the whole text in the column has to be the same. For finding words from one Column in an other, use one of this boxes.

13. Replace if Column Contains

With this box you can replace a value by an other if a specific word is found in the other column.

Example:

Aim: Your are editing the title and you want to assign the word "Pizzaspecial" instead of "Pizza", if the product is from "Dr.Ottker".

1 - As you always do, chose the column you want to edit. Here it is the column where you want to replace a value.

0d8e4503f5f50099f9cf45db0f5dab3c.png

2 - Now you have to chose the column where you want to search for a word (chose it in the dropdown).

299adefaf868c649f71caac4dae4cb9a.png

Fill in the word you are searching for in the text field.

51e69053ca6daac0d4fc0573df90c5c3.png
b78edf2d921274d6817c149b608645e8.png

3 - Now fill in the word you want to be replaced in column you are editing.

dcdd6e4dbb317d3750b9f7342f2666ca.png

4 - At last you have to write the word you want to replace the word before by.

72f8c15a94b1fca4309a3a07ef1d7155.png

criteria we seach for in the column brand : word you want to be replaced in the column title : word that replaces the word before

Result:

For all the products that are (from the brandt) "Dr.Ottker", in the title there will assign "Pizzaspecial" instead of "Pizza"

You can also use this box for id or category as reference columns.

14. For advanced users: use Regular Expressions with Preg Boxes

This boxes are only intended for advanced users who are already familiar with regular expressions.

You can learn more about them here.

For users without any background- knowledge, here we show you the use of those boxes with an easy example.

14.1 Preg Replace

1662971a1eb0c03b3ac48d9a284b901f.png

This function searches for a Regular Expression and replaces it by the Expression you fill in the box Replace.

7c2e8f3662fab780f7b055e3a7eb6585.png

This example searches for all the numbers from 1 to 7, and replaces them by "under 8".

For an overview and detailed description click here (in German) or here(in English).

14.2 Preg Match

This box works with Regular Expressions and is only intended for advanced users.

This box works as a kind of opposite to Preg Replace: Instead of choosing what to find and replace, you are choosing what to match and keep. You can use Preg Match for both simple match types and complex match types involving more than one variable.

We’ll use this text for some examples below: "This is the description of one of our products, details: colour: white, size: XS, brand: Nike."

For the simplest use case - finding a single type of value and keeping only it in a longer string - complete the RegEx field with the regular expression you want to find and keep. In this instance, you can leave the Assign field blank.

301eb273ac0c690f5953f016e2e67fd6.jpeg

Once saved, the rule will apply and only keep the value matched by the regular expression you entered:

New Text: “colour: white”

You can also use Preg Match for more complex operations:

a2a6cffe755a95dded3df18d1436e038.png

1 - In the RegEx field you fill in the Regular Expression you want to search.

2 - Assign: you fill in the number of expressions you want to replace the text by.

0: finds everything that is in your expression

1: finds the expression in the first parentheses

2: finds the expression in the second parentheses

Example Text: "This is the description of one of our products, details: colour: white, size: XS, brand: Nike."

Value in RegEx: “#(colour: [a-z]+), (size: [SXLM]*)#”

612b3c94692eec337fc98259315fdb90.jpeg

What will assign if you filled in the number 0:

New Text: "colour: white, size: XS"

fa8450f199a779d8dd94e11cee6b0c21.jpeg

What will assign if you filled in the number 1:

New Text: "colour: white"

b932a75a54ebaf1c9d89ca63409e335b.jpeg

What will assign if you filled in the number 2:

New Text: "size: XS"