Offhand, I think your best bet is to use a regex to identify everything from the @ to the TLD, then use the len returned by refind to do a replace of it. There are a number of really good regexes for finding/dissecting emails out there. CFLib.org is a good place to start.
--Ben Doom K Simanonok wrote: > I would like to use a regular expression to camouflage email addresses in a > forum I'm building. I'd like to replace just the domain name (not the .com > or .net or other extension though) with x's: > > FROM THIS: [EMAIL PROTECTED] > TO THIS: [EMAIL PROTECTED] > > Where the number of x's exactly matches the number of characters replaced. > Make sense? It should work with kludgy domain names having dashes in them > too (are there any other characters allowed? I don't think so) like so: > > FROM THIS: [EMAIL PROTECTED] > TO THIS: [EMAIL PROTECTED] > > Can anyone help me out with this? TIA > > Karl S. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270270 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4