I have a Liquid question. I have a string which could be like “8 lb / Adult” or “3.5 oz”. I want to be able to take the number part, multiply it by some number and then output the result. So for example start with “8 lb / Adult”, get the 8, multiply by 2, and put it back in the string to end up with “16 lb / Adult”. I’m not sure how to do this or if it’s possible in liquid.
I figured it out with JS instead. If you’re wondering why I needed to do this, the client requested it.