Replacenocase - MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference

Cfml language reference
Table of Contents

Advertisement

502

ReplaceNoCase

Returns string with occurrences of substring1 being replaced regardless of case
matching with substring2 in the specified scope.
See also Find, Replace,
Syntax
ReplaceNoCase( string , substring1 , substring2 [, scope ])
string
Any string.
substring1
String to be replaced.
substring2
String that should replace occurrences of substring1.
scope
Defines how to complete the replace operation:
ONE
ALL
Examples
<!--- This example shows the use of ReplaceNoCase --->
<HTML>
<HEAD>
<TITLE>
ReplaceNoCase Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>ReplaceNoCase Example</H3>
<P>The ReplaceNoCase function returns <I>string</I> with
<I>substring1</I> being replaced by <I>substring2</I> in
the specified scope.
<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>#ReplaceNoCase(FORM.myString,
FORM.MySubstring1, FORM.mySubString2)#</CFOUTPUT>
</CFIF>
...
ReplaceList,
— Replace only the first occurrence (default).
— Replace all occurrences.
The search/replace is case-insensitive.
and REReplace.
CFML Language Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents