Peter, I have function that handles something similar:
http://www.bennadel.com/blog/191-REReplace-Java-Function-Pointers-Freaki n-Sexy-.htm OR: http://www.bennadel.com/index.cfm?dax=blog:191.view Take a look and that and see if it helps. It basically takes a function pointer that will be applied to each group as the matches are found. It passes the array of matches to the group and expects a string to be returned. ...................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: Peter Boughton [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 10:41 AM To: CF-Talk Subject: regular expression - callback function Hello. Does anyone know how I can implement a regex callback? ie: I have the following code: <cfset Content = REReplace(Content,'<'&'cfif \(Var\(([^,]+),"([^"]+)")\) ([A-Z]+) "([^"]+\)">', '<'&'cfif (Var(\1),"\2")) \3 "\4">', "all")/> And I need to run a function on \1, \3 and \4 as they are replaced. I'm fairly sure CF itself doesn't have this functionality, but I'm hoping someone can provide a simple Java example of how it works? Thanks, Peter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269550 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

