Nov 12, 2001 #1 innu Programmer Jun 13, 2001 40 AT Hi, I've a list like the following: BMW, VW, 3, Ford, 27, Toyota, ... I want to filter out the numbers like 3, 27 and put these numbers into a new variable. How can I do this?
Hi, I've a list like the following: BMW, VW, 3, Ford, 27, Toyota, ... I want to filter out the numbers like 3, 27 and put these numbers into a new variable. How can I do this?
Nov 12, 2001 #2 Silvano Programmer Jul 16, 2001 386 US <cfset numericList=""> <cfset originlist="BMW, VW, 3, Ford, 27, Toyota"> <cfloop index="i" list="#originlist#"> <cfif IsNumeric(i)> <cfset numericList=ListAppend(numericList, i)> </cfif> </cfloop> <cfoutput>#numericList#</cfoutput> Sylvano dsylvano@hotmail.com Upvote 0 Downvote
<cfset numericList=""> <cfset originlist="BMW, VW, 3, Ford, 27, Toyota"> <cfloop index="i" list="#originlist#"> <cfif IsNumeric(i)> <cfset numericList=ListAppend(numericList, i)> </cfif> </cfloop> <cfoutput>#numericList#</cfoutput> Sylvano dsylvano@hotmail.com
Nov 12, 2001 Thread starter #3 innu Programmer Jun 13, 2001 40 AT Hi, thank you very much! It works great! sl, Innu Upvote 0 Downvote