I have a String and i need to convert it into Currency format and
verify whether it matches to the expected.
Let me explain in detail
String = “$6,178.50 USD / 22,693.01 AED”
I want to split it into 2 different variables like
usa_price = $6,178.50
aed_price = 22,693.01
expected_output= $6,178.50 * 3.67 = 22,693.01 (should match value in
I tried doing gsub/scan and im confused now, what’s the best way to
achieve this in Ruby!!!