Thanks Ray, that one did the trick. I won't even tell ya what I was
trying to use...

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 23, 2002 3:21 PM
To: CF-Talk
Subject: RE: String Manipulation help needed


No - that will return "http:

This will work better:

<cfset theURL = "http://www.cflib.org/foo/goo.html";>
<cfset regex = "(http://[^/]*)/.*">
<cfset x = REReplace(theURL,regex,"\1")> <cfoutput>#x#</cfoutput>

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Dave Hannum [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 3:14 PM
> To: CF-Talk
> Subject: Re: String Manipulation help needed
> 
> 
> Try this,
> 
> ListFirst("http://www.foobar.com/images/screwy.gif";, "/")
> 
> Dave
> 
> 
> ----- Original Message -----
> From: "Tim Claremont" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, April 23, 2002 2:59 PM
> Subject: String Manipulation help needed
> 
> 
> I have the following string:
> 
http://www.foobar.com/images/screwy.gif

I want to return everything before the third /

In other words, I want to retrieve the following:

http://www.foobar.com


I am sure there is a simple string function. What am I missing?

T




______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to