Depending on how good your Java is, you may want to look at using a
java.io.BufferedReader with a FileReader so that you can go through
your file line by line, rather than doing it all in one chunk.

Failing that, if you want to stick to cf, you could always do <cffile>
in, and then do a fileContents.split(char(10)); to break it out into
an array of lines.

Just some thoughts to make your life a little bit easier.

Mark

On 5/17/07, Claude Schneegans <[EMAIL PROTECTED]> wrote:
>  >>I'm trying to parse a text file into my database
>
> Perfect job for CF_REExtract:
> - Go to
> http://www.contentbox.com/claude/customtags/REextract/testingREextract.cfm
> - enter [0-9]{5,5} *\(base 16\) * in RE1
> - enter [0-9]{2,2}-[0-9]{2,2}-[0-9]{2,2} in RE2
> - enter a sample of your file in the textarea, ie:
> 00-00-00   (hex)        XEROX CORPORATION
> 000000     (base 16)        XEROX CORPORATION
>                 M/S 105-50C
>                 800 PHILLIPS ROAD
>                 WEBSTER NY 14580
>                 UNITED STATES
>
> 00-00-01   (hex)        XEROX CORPORATION
> 000001     (base 16)        XEROX CORPORATION
>                 ZEROX SYSTEMS INSTITUTE
>                 M/S 105-50C 800 PHILLIPS ROAD
>                 WEBSTER NY 14580
>                 UNITED STATES
>
> 00-00-02   (hex)        XEROX CORPORATION
> 000002     (base 16)        XEROX CORPORATION
>                 XEROX SYSTEMS INSTITUTE
>                 M/S 105-50C 800 PHILLIPS ROAD
>                 WEBSTER NY 14580
>                 UNITED STATES
>
> 00-00-03   (hex)        XEROX CORPORATION
> 000003     (base 16)        XEROX CORPORATION
>                 ZEROX SYSTEMS INSTITUTE
>                 M/S 105-50CEW AVENUE 800 PHILLIPS ROAD
>                 WEBSTER NY 14580
>                 UNITED STATES
>
> 00-00-04   (hex)        XEROX CORPORATION
> 000004     (base 16)        XEROX CORPORATION
>                 OFFICE SYSTEMS DIVISION
>                 M/S 105-50C 800 PHILLIPS ROAD4
>                 WEBSTER NY 14580
>                 UNITED STATES
>
> .... and see the result.
> You can then loop on the query and extract whatever you need from each
> record.
> But it will take more than 5 seconds ;-/
>
> --
> _______________________________________
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED])
> Thanks.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278535
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