Trying to turn $123,456 into 123456
Getting rid of the $ sign is easy...
#Replace(mynumber, $, , ALL)#
But I'm not sure how to kill the $ and the , at the same time with
the least amount of fuss...
~|
Message:
rereplace(myNumber, '[$,]', '', 'all')
On 3/18/06, Les Mizzell [EMAIL PROTECTED] wrote:
Trying to turn $123,456 into 123456
Getting rid of the $ sign is easy...
#Replace(mynumber, $, , ALL)#
But I'm not sure how to kill the $ and the , at the same time with
the least amount of fuss...
I must confess to being a regex beginner so it might not be the most elegant
way but
cfset num = $123,456
cfset newnum = rereplace(num,[^[:digit:]],,ALL)
cfoutput#num#,#newnum#/cfoutput
On 3/18/06, Les Mizzell [EMAIL PROTECTED] wrote:
Trying to turn $123,456 into 123456
Getting rid of the $
Michael Traher wrote:
I must confess to being a regex beginner so it might not be the most elegant
way but
cfset num = $123,456
cfset newnum = rereplace(num,[^[:digit:]],,ALL)
cfoutput#num#,#newnum#/cfoutput
This would probably work better than the other option because the other
option
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Trying to turn $123,456 into 123456
Getting rid of the $ sign is easy...
#Replace(mynumber, $, , ALL)#
But I'm not sure how to kill the $ and the , at the same
time with the least amount of fuss...
Les,
I just solved the same problem for a form
5 matches
Mail list logo