Stopped the regex swallowing trailing commas, and improved decimal place computation