Task
The pack quantity is inside text, for example Box, pack 12 pcs. The output table needs pack_qty.
Short answer
Create pack_qty and keep the number before pcs or units with \d+(?:[,.]\d+)?(?=\s*(?:pcs?|units?)).
How to Do It in Eofferix
- Open the settings of the output
pack_qtycolumn.
The click is on the settings icon of the pack_qtycolumn. - In
Transformations, add\d+(?:[,.]\d+)?(?=\s*(?:pcs?|units?))withRemove everything except.
The Transformationsblock shows the full rule chain for this case. - Save the column settings and go to the
Exportstep.
Before / After
Before
source data| sku | package_text |
|---|---|
| SKU-900 | Box, pack 12 pcs |
| SKU-901 | Bag 6 pcs |
After
result| sku | pack_qty |
|---|---|
| SKU-900 | 12 |
| SKU-901 | 6 |