\ is a special character in RegExp and has to be escaped to \\
If you want to strip the server from the path, and you don't have the
server name, you could do
REReplace(sr,"^\\\\[^\]+","")
-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: donderdag 23 oktober 2003 13:36
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]

