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 only removes the $ and , ... where this one strips all non-digit 
characters.

I probably wouldn't have thought of this one, myself.

you'd have to get a little trickier if you want to keep decimal points =)

Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235716
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to