Returns string with a regular expression replaced with substring in the specified scope. This is a case-sensitive search.
REReplace(string, reg_expression, substring [, scope ])
REFind, Replace, ReplaceList, REReplaceNoCase
<!--- This example shows the use of REReplace --->
<html>
<head>
<title>REReplace Example</title>
</head>
<body bgcolor = silver>
<H3>REReplace Example</H3>
<P>The REReplace function returns <i>string</i> with a regular
expression replaced with <i>substring</i> in the specified scope. This
is a case-sensitive search.
<P>REReplace("CABARET","C|B","G","ALL"):
<cfoutput>#REReplace("CABARET","C|B","G","ALL")#</cfoutput>
<P>REReplace("CABARET","[A-Z]","G","ALL"):
<cfoutput>#REReplace("CABARET","[A-Z]","G","ALL")#</cfoutput>
<P>REReplace("I love jellies","jell(y|ies)","cookies"):
<cfoutput>#REReplace("I love jellies","jell(y|ies)","cookies")#
</cfoutput>
<P>REReplace("I love jelly","jell(y|ies)","cookies"):
<cfoutput>#REReplace("I love jelly","jell(y|ies)","cookies")#</cfoutput>
</body>
</html>