Wouldn't it be pretty straightforward and more legible to just loop over the
list and do a conditional on each loop iteration?  Unless you've got a
ridiculously large list it should still perform well enough.

<!--- create list --->
<cfset variables.exampleList = "Boat,Goat,Moat,CherryPie">

<!--- output only the words that contain "oat" --->
<cfloop list="#variables.exampleList#" index="i">
       <cfif i contains "oat">#i#</cfif>
</cfloop>

As far as your original question regarding multiple delimiters... cfloop
does accept multiple delimiters, but the implementation is that it looks for
any of those characters... not the characters as a string.

For example, <cfloop list="#myList#" index="i" delimiters=",:">

will look for the comma as a delimiter -or- the colon.

so "Foo,Bar:Baz" would be a 3 element list.

On Thu, Feb 11, 2010 at 2:28 PM, Leigh <cfsearch...@yahoo.com> wrote:

>
> > multiple character delimiter.
>
> I believe CF does not support that natively. Check cflib.org. I have not
> tried them, but it looks like there are a few functions for multi-character
> delimiters
>
> http://www.cflib.org/udf/splitMX
> http://www.cflib.org/udf/split
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330635
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to