Well, I would definitely say drop it in an array as James suggested then
loop that array and check each record for an email address. You could even
use what I had in the previous email with a lil' extra to it.
<cfset myarray = "insert data array here">
<cfset len = ArrayLen(myarray)>
<cfloop from="1" to="#len#" index="i">
<cfloop list="#myarray[i]#" item="k">
<cfif i isValid("email", ListGetAt(myarray[i], k, "|"))>
<!--- add to db here --->
</cfif>
</cfloop>
</cfloop>
Essentially, loop over the array and each array slot will be a list (if you
create the array based on chr 10/13) containing all of the data. Loop over
that array slot as a list and check for valid email addresses. If you know
the email address would always be in slot 3 you could eliminate the 2nd loop
and just have a <cfif ListLen(myarray[i]) GT 2> to know if you should check
element 3 or not.
Hope that helps a little more. I'll be on for awhile so I can help for the
next few hours.
On 2/10/06, dave <[EMAIL PROTECTED]> wrote:
>
> right, not all will have 3 items and some "could" have 4 or 5.
> Basically what it is, is the recieve warranty cards in the mail and add
> them into filemaker but they want the ones with email addresses to go into
> the websites email list.
>
> ~Dave the disruptor~
> I forgot what I was gunna put here, Will woulda stole it anyways!
>
> ----------------------------------------
> From: "John C. Bland II" <[EMAIL PROTECTED]>
> Sent: Friday, February 10, 2006 2:28 AM
> To: CF-Talk <[email protected]>
> Subject: Re: parsing a list
>
> Ahh...my bad. I didn't think I was 100% clear on the issue.
>
> On 2/10/06, James Holmes wrote:
> >
> > Not all of the rows have 3 items, according to the original post.
> >
> > On 2/10/06, John C. Bland II wrote:
> > > Can you use a | instead of a , to separate your lists? It seems too
> > > confusing visually to read yet alone trying to parse it.
> > >
> > >
> > >
> > >
> > >
> > >
> > > for
> > > deletes (i don't suggest that though...do it all in 1 loop) --->
> > >
> > >
> > >
> > > I could be looking at your problem wrong so my apologies if so. This
> > > basically loops your list and checks every 3rd item against the
> isValid
> > > function. If it fails, do the delete. If not, move on.
> >
> > --
> > CFAJAX docs and other useful articles:
> > http://jr-holmes.coldfusionjournal.com/
> >
> >
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231875
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54