What filter can I use to convert "$ 60,000 USD" into "60000"?

Options

Hi,

I'm receiving some prices through an external api and need to extract the price number.

What is the best way to to convert "$ 60,000 USD" into "60000"?

Thanks!

Tagged:

Best Answer

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Answer ✓
    Options

    So your regex pattern should be in a place of variant_in_clinet_catalog.price

    replacement should be left empty

    subject should be your variant_in_clinet_catalog.price

Answers