Last post Mar 24, 2016 02:51 PM by Rion Williams
Mar 24, 2016 02:20 PM|Adam-M|LINK
and 0-9, and strip leading zeros.
So for example £23.25 would be converted to 23.25
£50,000.01 would be converted to 50000.01
and £0050.95 would be converted to 50.95
I really need to learn regex better but any help would be appreciated.
Thanks in advance
Mar 24, 2016 02:51 PM|Rion Williams|LINK
I'm assuming that your input would only be the actual value itself. If that's the case, then you could use something like this :
This should parse your value in by stripping off any non-digit and decimal characters and then use the Number function to properly parse in the numeric value. You can
see a working example of this here. But basically your function might look like :
// This uses a Regex to stripp off all non digits and decimal points ([^\d\.]+) and then
// uses the Number function to get rid of any leading zeroes, etc.
An input / output chart might look like :