I pretty much took this right out of ColdFusion Help.


<cfset FORM.MyString = "Replace all spaces with nothing.">
<cfset FORM.MySubstring1 = " ">
<cfset FORM.MySubstring2 = "">

<P>The Replace function returns <I>string</I> with 
<I>substring1</I> being replaced by <I>substring2</I> in
the specified scope.  This is a case-sensitive search.

<CFIF IsDefined("FORM.MyString")>
<P>Your original string, <CFOUTPUT>#FORM.MyString#</CFOUTPUT>
<P>You wanted to replace the substring <CFOUTPUT>#FORM.MySubstring1#
  </CFOUTPUT>
with the substring <CFOUTPUT>#FORM.MySubstring2#</CFOUTPUT>.
<P>The result: <CFOUTPUT>#Replace(FORM.myString,
FORM.MySubstring1, FORM.mySubString2, "ALL")#</CFOUTPUT>
</CFIF>

Ann Marie Thurmond
NetNoir, Inc.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to