<!--- Loop over the text using the email address pattern. For each iteration, we are gonna use the Variable attribute to flag that we actually want to update the target string. Because of this flag, updates to the INDEX variable will be integrated back into the new string. ---> <cfmodule template="reloop.cfm" index="strMatch" pattern="#strRegEx#" text="#strText#" variable="strUpdatedText"> <!--- For each email address, we want to change the COM domain extension to be the ORG extension. To do that, we have to update the INDEX value. ---> <cfset strMatch = REReplace( strMatch, "\.\w+$", ".org", "ONE" ) /> </cfmodule> <!--- Now that we have finished looping, our Variable, strUpdatedText, should now have the updated text value. ---> #strUpdatedText#