With what you have now, you should be using replace not REreplace But... of course I'd just use a regex to strip everything but numbers Rereplace(phone, "[^\d]", "", "all")
If there happen to be any other characters that you want to keep besides digits (like a space) just put them right after the \d but inside the closing bracket Example: Rereplace(phone, "[^\d ]", "", "all") ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 22, 2008 3:26 AM To: CF-Talk Subject: Parse phone number characters - almost there ... I've got different phone number formats due to an csv import. I'm trying to remove phone number formating from the database and just have the numbers. As I parse through my phone numbers from a query, this code is throwing errors. I'm trying to get rid of ')', '(', '.' and '-' <cfset phone = rereplace(phone, "(", "", "all") /> <cfset phone = rereplace(phone, ")", "", "all") /> <cfset phone = rereplace(phone, ".", "", "all") /> <cfset phone = rereplace(phone, "-", "", "all") /> Thanks D ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303964 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4