Yet another way.. With regular expressions:
<cfset maskDigits=8>
<cfset masked=REReplace(CCnum,"^[0-9]{#maskDigits#}",repeatString("*",maskDigits))>
-Ryan
-----Original Message-----
From: Ryan Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 7:56 AM
To: CF-Talk
Subject: Replacing characters in a string
This should be a simple enough one...
I have a credit card number, 16 digits long, and I want to star (*) out the
middle 8. How do I do this?
TIA
Ryan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4