Actually that's not true.

If the first list is longer than the second list then any extra entries 
in
the first list will be removed from [string].

Example:
<cfset temp = replaceList("abcdefghi","a,b,c","x,y")>
x replaces a
y replaces b
c is deleted
end result will be xydefghi

If the second list is longer then any extra entries will be ignored.

Also, don't forget that replaceList() is case sensitive!

+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may 
have
peace'..."
        - Thomas Paine, The American Crisis



-----Original Message-----
From: Jim McAtee [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 6:07 PM
To: CF-Talk
Subject: Re: replace list????


Three things.  You forgot to place the first list (the second function
argument) within quotes.  Secondly, with ReplaceList(), both the second 
and
third arguments need to be lists with the same number of items.  If you 
want
to replace 12 different strings with the same thing, then you need to 
repeat
it 12 times in the replacement list.  Third, the function takes only 
three
arguments; there's no scope as an optional fourth argument.  Get rid of 
the
"all".  Adn be sure to remove that space before the ending #.

Jim


----- Original Message -----
From: "Jeff Fongemie" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 25, 2002 6:55 PM
Subject: replace list????


> Friday, January 25, 2002, 8:53:10 PM
> Hello CF-Talk,
>
>   I'm attempting to use a replace function with cfhttp. The page I'm>   getting is 
>:<cfhttp url=
"http://met-www.cit.cornell.edu/cgi-bin/fcst?NH004";
>
>   method = "get">
>
>
>   And I'm trying to remove a bunch of the top stuff using:
>
> <cfoutput>
>
#ReplaceList(cfhttp.fileContent,androscoggin-interior,waldo-kennebec-nor
ther
n,carroll-southern,carroll-southern,franklin-southern,
>
grafton-southern,oxford-southern,somerset,-including,the,cities,of,augus
ta,c
onway,farmington,lebanon,lewiston,ossipee,rumford,skowhegan,unity,  
"<BR>",
"All") #
> </cfoutput>
>
> But, I keep getting an error! does not know what to do with
> androscoggin?
>
> Can anyone see a mistake with my replace list??
>
>
> Best regards,
>  Jeff Fongemie                          mailto:[EMAIL PROTECTED]

______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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