A supplier file adds a three-letter warehouse prefix to each SKU: CAL00123, NYC00456, TEX07890. The import needs the clean SKU without the first 3 characters: 00123, 00456, 07890.
Create sku_clean from sku_raw and add one rule: condition Regular expression with ^.{3}, action Remove substring.
How to do it in Eofferix
Upload the CSV or XLSX file with the
sku_rawcolumn where the first 3 characters are always a service code.Create the result column
sku_cleanfrom the source columnsku_raw.Open the settings for
sku_cleanwith the gear icon in its header.
The preview shows CAL00123becoming00123.In
Transformations, chooseRegular expression, enter^.{3}, and set the action toRemove substring.
The pattern ^.{3}finds the first 3 characters at the start of the string, and the action removes that match.Save the settings and check several rows:
NYC00456should become00456, andTEX07890should become07890.
Before / after
Before
source data| sku_raw | product |
|---|---|
| CAL00123 | Hudson desk lamp |
| NYC00456 | Maple wall shelf |
| TEX07890 | Trail travel mug |
After
result| sku_clean | product |
|---|---|
| 00123 | Hudson desk lamp |
| 00456 | Maple wall shelf |
| 07890 | Trail travel mug |
What to keep in mind
- Use this method when the extra prefix has the same length in every row.
- If the prefix is separated by a character, such as
CAL-00123, use the remove-text-before-character case instead. - Change the number for another length:
^.{2}removes the first 2 characters, and^.{4}removes the first 4.