0

I have an integer field that I am using for price info (not commerce) and I am importing from a csv. I need to strip out the $ sign and a blank space after. "$ ". How can I do this with feeds tamper?

  • Isn't it easier to update the .csv file? – Wim Mostrey Jan 28 '17 at 16:31
  • No, these are automated, periodic imports and we don't have access to the source. – Nigel Waters Jan 28 '17 at 16:40
0

This is pretty easy. You can use the "Find replace" tamper under "Text", and then user "$" as the search and "$ " as the replace. If you want to be fancy you can use the "Find replace REGEX" tamper to make sure you only get the leading $. IIRC, this needs to include the delimiters. Using "/^\$/" as the search and "$ " as the replace should work (you need the ^ to anchor to the beginning and then escape the $. Both of these plugins are part of the base feeds_tamper module.

  • I did try the find replace before posting but it didn't take. I assumed it was because of the blank space. I will try the regex way. – Nigel Waters Jan 28 '17 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.