How to Find and Replace Any Word (String) in Your Feed?
Sometimes your product data contains a word or piece of text that you want to change in your feed, but you do not want to change it on your actual website. For example, you might want to shorten Small to S, replace a separator symbol, or swap out an old brand name. CTX Feed lets you do this without touching your original product data at all.
There are two ways to do this in CTX Feed. The first method uses the built-in String Replace tool in the Filter tab — it is the easiest and works for most people.
The second method uses a command typed directly into the attribute field — it is more flexible and useful when you need to replace text in a specific attribute only.
Method 1: String Replace (Filter Tab)
Use the built-in String Replace rows inside the Filter tab. Choose which attribute to search, type what you want to find, and type what you want to replace it with. No commands needed.
✅ Best for most users — no commands required
Method 2: str_replace Command
Type a short command into the Output box of any attribute field. Works on a single attribute at a time. Useful when you want to replace text inside one specific field without affecting others.
✅ Best for per-attribute control
Video Tutorial: How to Find and Replace Any Word in Your Feed
Method 1 — String Replace in the Filter Tab
This is the simplest way to replace text in your feed. You do not need to type any commands. Everything is done through a simple form inside the Filter tab.
Step by step
- Open the feed you want to edit. Go to CTX Feed → Make Feed and click Edit on your feed.
- Click the Filter tab at the top of the feed edit page.
- Scroll down to the String Replace section.
- Choose the attribute you want to search (for example: Title, Description, Category).
- In the Search Value box, type the word or text you want to find.
- In the Replace Value box, type what you want to replace it with.
- Need to replace more than one thing? Click Add New Row to add another line.
- Click Update and Generate Feed to save and rebuild the feed.

Example — Replacing “Small” with “S” in product titles
Say some of your products have the word Small in the title, but the channel you are sending the feed to expects the short version S. You want the feed to show S, but you do not want to change the product title on your website.
Blue Cotton T-Shirt Small (Title in your store)→ Blue Cotton T-Shirt S (Title in your feed)
Method 2 — The str_replace Command
If you want to replace text inside a specific attribute field using a command, you can use [str_replace => find => replace]. You type this command directly into the Output box next to the attribute on the feed field list.
💡 Where is the Output box? On the feed field list (the table showing all your feed fields), each row has a small text box to the right of the attribute dropdown. That is the Output box. Type your command there. Not sure where this is? See the Format Attribute Output guide for a screenshot showing exactly where to find it.
How to write the command?
The format is always:
[str_replace => find this => replace with this]
Replace find this with the exact word or text you want to find, and replace with this with what you want instead. The spaces around the => arrows are important — include them exactly as shown.
📋 Examples
1. Replace a word — “ABC” with “XYZ”
You want to swap out a brand name or any plain word in an attribute.
[str_replace => ABC => XYZ]
ABC Running Shoes (Before) → XYZ Running Shoes (After)
2. Replace a category separator — “>” with “|”
Some channels use a different separator between category levels. If your category path uses > but the channel expects |, use this command.
[str_replace => > => |]
Clothing > Men > Shirts (Before) → Clothing | Men | Shirts (After)
3. Replace a comma — “,” with “>”
When the text you want to find or replace is a comma, you cannot just type a comma in the command — it confuses the parser. Instead, write the word comma and CTX Feed will understand that you mean the comma character.
[str_replace => comma => >]
⚠️ Important: Always write comma (the word) when you mean the , character. Do not put a literal comma inside the command brackets.
Clothing, Men, Shirts (Before) → Clothing > Men > Shirts (After)
Which Method Should You Use?
Both methods do the same thing — replace text in your feed without changing your store data. Here is a simple way to decide:
🔹 Use Method 1 (String Replace in Filter tab)if you want to replace the same word across an entire attribute for all products, and you do not want to type any commands. This is the easiest option and works for most situations.
🔹 Use Method 2 (str_replace command) if you are already using other commands in the Output box and want to keep everything in one place, or if you want to combine the replace with other formatting (for example, replace a word and then convert to uppercase in one step).
You must be logged in to post a comment.
Hi,
we have product categories that contain [shy] in the category name which outputs as in the frontend and in the xml feed.
This needs to be removed from the feed output, but no matter what I try, it’s still there!
Output example:
subcategory ]]>
Please provide help how I can solve this!
Thanks
Stefanie
Hi Stefanie,
Can you please, explain the issue with a screenshot explaining which stings to be removed?