ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 29th, 2005, 03:11 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
Question find( ) question

i have a list as follows
<cfset myList = "WORDPERFECT,WORDPERFECT,WORDPERFECT,Digitally imported">

i need to extract some values out of this list.
<cfset myValidProducts = "Word, WordPerfect, Lotus, ...">

what i need is
<cfloop index="k" list="#myList#">
<cfset myP = REFIND("[^#k#$]",myValidProducts , 1, "FALSE") >
<cfoutput>#myP#</cfoutput>
</cfloop>

what happens is it returns Word and WordPerfect even if Word does not exist in myList. How can i force myP so that it will look at the things starting with and ending with the search results ? thanks for the help in advance

Reply With Quote
  #2  
Old June 30th, 2005, 12:44 PM
fortunato fortunato is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 33 fortunato User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 36 m 52 sec
Reputation Power: 4
I would recommend using the ListContains, or ListContainsNoCase function.

something like:

loop over list myValidProducts item=i
{
if ListContainsNoCase(myList,i)
// do whatever you like
}

There are also some list comparison functions at cflib.org that might help. You will need a login.

HTH.

Reply With Quote
  #3  
Old June 30th, 2005, 02:44 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
close i did listfind() then used listgetat() to return what i needed. thanks for taking time to respond...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > find( ) question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT