> From: Tuan [mailto:[EMAIL PROTECTED]] > > Can somebody explain what the difference is between the > REReplace and Replace function? Im confused when to use one > or the other and their differences.
Here's an example. <cfset myString="a1b2c3d4e5f6g7h8i9j0"> If I wanted to remove the number 1 from this string, that's simply Replace(myString,"1","","ALL") But if I wanted to remove all the numbers, I'd have to do Replace(myString,"1","","ALL") Replace(myString,"2","","ALL") Replace(myString,"3","","ALL") Replace(myString,"4","","ALL") Replace(myString,"5","","ALL") Replace(myString,"6","","ALL") Replace(myString,"7","","ALL") Replace(myString,"8","","ALL") Replace(myString,"9","","ALL") Replace(myString,"0","","ALL") Or REReplace(myString,"[^0-9]","","ALL") Regular Expressions can be quite powerful, and I've only scratched the surface. The syntax can be hard to grok, though. (I don't pretend to be anything but a Regular Expression amateur.) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

