On 5/23/00, [EMAIL PROTECTED] penned:
>I'm stuck on something that might be really simple to someone.
>
>I have these large flat files that are carriage return delimited that
>contain the same data over and over again. I'm trying to parse out
>this data for display and later for database insertion.
>
>I've figured out how to pull out the email address information but
>I need to pullI out the name information too. Here's what I have so
>far and the format of the flat file.
>
>***BEGIN**FLAT**FILE******
>Email: [EMAIL PROTECTED]
>Name: firstname lastname
>Email: [EMAIL PROTECTED]
>Name: firstname lastname
>Email: [EMAIL PROTECTED]
>Name: firstname lastname
Since the first word of each 2 record recordset you're trying to
capture is Email, why don't you do it like this:
<CFFILE (blah blah)
VARIABLE="text">
<cfset delim = chr(13) & "Email">
<cfset text = replace(text, delim, "|Email", "ALL")>
That should effectively make the text variable look like this:
Email: [EMAIL PROTECTED]
Name: firstname lastname|Email: [EMAIL PROTECTED]
Name: firstname lastname|Email: [EMAIL PROTECTED]
Name: firstname lastname
Than you can do a loop on the pipe delimiter and nest a loop inside
on the chr(13) delimiter . That should give you a good start.
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.