The REReplace is used for pattern matching replaces (regular expressions)
whereas the Replace is used for known patterns such as yours (you knew you
wanted to strip out all the \ no matter where they were). If you wanted to
strip out slashes that only appeared after a certain character you would use
REReplace with a regular _expression_ that did the pattern matching for you.


Hope that helps.


Mike

-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 7:48 AM
To: CF-Talk
Subject: RE: Stripping extra backslashes from URLDecode from UNC path

That was it! Thanks.

Whats the difference?

--Original Message Text---
From: Tangorre, Michael
Date: Thu, 23 Oct 2003 07:35:51 -0400

How about just a normal replace as apposed to a REReaplce.?

-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 7:36 AM
To: CF-Talk
Subject: re: Stripping extra backslashes from URLDecode from UNC path

Hi,

I can't seem to get rid of an extra backslash when I'm outputting from my
<cfdirectory. Below is an example output and the code I'm using to try and
get rid of the extra slash.

<cfset sr = #URLDecode(URLEncodedFormat(dir))#>

The above outputs the following:

\\MYSERVER\test\

I then do a replace...

<cfset sr = #REReplace("#sr#","\\MYSERVER","","ALL")#>

Now it outpus as:

\\test\

No matter what I try I can't get rid of that extra "\| at the beginning.

Any ideas?

  _____  

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to