|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
close
i did listfind() then used listgetat() to return what i needed. thanks for taking time to respond... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > find( ) question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|