Am trying to remove the currency character after formatting the currency using NumberFormat
import java.text.NumberFormat;
BigDecimal currencyAmount = new BigDecimal(9876543.21)
def currentLocale = Locale.US
def currencyFormatter = NumberFormat.getCurrencyInstance(currentLocale);
println "formatted currency = "+currencyFormatter.format(currencyAmount)
This prints $9,876,543.21
but I dont want $ or any currency character in the formatted currency. Is there anyway to do it?