Replaces multiple values in a string with a single value.
Note: This function is only available in Templates and can’t be used in Reporting.
Syntax
substitute_all(ATTRIBUTE, "to text", "from text", "from text 2", "from text 3")
Parameters
Attribute
: An feed attribute such asITEM_TITLE, ITEM_COLOR
, orITEM_BRAND
.to text
: The value that replaces the items.from text
: The values that you want to replace.
Examples
[substitute_all(ITEM_TITLE, "", "®", "Men's ", "Women's ")]
replaces the trademark symbol, Men's and a space, and Women's and a space in the title of an ad with blank.
The substitute_all function replaces the following nested functions:
[substitute(substitute(substitute(ITEM_TITLE, "®", ""), "Men's ", ""), "Women's ", "")]