i want to import large list of updated products sku.

now, the existing list looks like: 001-002-003

new products sku list looks like: 001-002-003-004

so, to import correctly, i must remove the last block in sku (-004).

so, my question is: can i, first, explode field value (separator "-", limit 3) and after that, implode the resulted value?

or that is the same, perform new action on results of previous action?

thanks.

Comments

twistor’s picture

Exploding with a limit 3 will give you an array('001', '002', '003-004').

Why don't you try the regex find replace plugin?

Find: /^(.*)-\d+$/
Replace: $1

twistor’s picture

Issue summary: View changes
Status: Active » Closed (fixed)