Assuming salesamount is required, the following result was found.
// yields 30 And if working with money/currencies, a one liner to maintain the decimal point v_SalesAmount = "Total : £ 5.00"; v_SalesAmount = v_SalesAmount.replaceAll("[^0-9.]",""); // yields 5.00