reReplace(rc.hourlyRateInvoicedToClient, "[^[:digit:]\.]", "", "all")


A set [] takes all the options in it as options, so escape the . with \. 
and you should be good to go.

----------------------------------------

From: "Nando" <d.na...@gmail.com>
Sent: Tuesday, January 18, 2011 2:09 PM
To: "cf-talk" <cf-talk@houseoffusion.com>
Subject: Regex to strip out non-numerics but leave decimal point

I'm trying to strip out all non-numeric characters from some fields. The
catch is I need the regex to leave in the decimal point, cuz these are 
rates
that include cents.

rereplace(rc.hourlyRateInvoicedToClient,'[^[:digit:]]','','all')

I'm not sure how to work something like [^\.] into it. Can anyone help?

Thanks,

Nando



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340980
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to