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?

2
  • Isn't it easier to update the .csv file? Jan 28, 2017 at 16:31
  • No, these are automated, periodic imports and we don't have access to the source. Jan 28, 2017 at 16:40

1 Answer 1

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.

1
  • 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. Jan 28, 2017 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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