If you got this list from a CFDIRECTORY tag, you may want to use the
FILTER option instead to automatically only return files named .96.

As for finding elements in a list that match ".96" (and match at the
END), there are a variety of ways. Here is one:

<CFLOOP INDEX="Item" LIST="#List#">
        <CFIF ListLen(Item,".") GT 1 AND ListLast(Item,".") IS "96">
                good one
        </CFIF>
</CFLOOP>

You need the listlen because ListLast(Item,".") will return true if the
item is JUST 96, not .96.

=======================================================================
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, September 21, 2001 9:49 AM
> To: CF-Talk
> Subject: Re: String manipulation
> 
> 
> Hi all,
> 
> 
> How can extract only the files with the following file 
> extensions ".96" 
> from the string below and display the results as
> 
> Output:
> 1.96,2.96
> 
> 
> test1.txt,test2.txt,test3.txt,file1.96,test4.in,test5.dat,file
> 2.96,file3.96,test6.dat,test5.doc,test5.jb
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to