reReplace = replaces based on a RE (Regular Expression)
and
Replace = replaces based on a string literal? or string?
...tony
Tony Weeg
Senior Web Developer
UnCertified Advanced ColdFusion Developer
Information System Design
Navtrak, Inc.
Mobile workforce monitoring, mapping reporting
Tuan writes:
Can somebody explain what the difference is between the REReplace and Replace
function? Im confused when to use one or the other and their differences.
replace() is a simple function to replace one character (or string of
characters) with another.
for example, in the string
From: Tuan [mailto:[EMAIL PROTECTED]]
Can somebody explain what the difference is between the
REReplace and Replace function? Im confused when to use one
or the other and their differences.
Here's an example.
cfset myString=a1b2c3d4e5f6g7h8i9j0
If I wanted to remove the number 1 from
Replace() looks for a literal string within another string and replaces it
with yet a third string:
Replace(contentstring, stringtoreplace, replacement);
With REReplace(), you can search for and replace with regular expressions.
This makes the function much more powerful and often more useful,
: Regular Expressions can be quite powerful, and I've only scratched the
: surface. The syntax can be hard to grok, though. (I don't pretend to be
: anything but a Regular Expression amateur.)
If you knew the number of times that this particular RENinja learned a new
trick from an ameteur who did
- Original Message -
From: Ben Doom [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, February 14, 2003 2:51 PM
Subject: RE: REReplace and Replace function
Replace() looks for a literal string within another string and replaces it
with yet a third string:
Replace(contentstring
6 matches
Mail list logo