Suggestions on how to replace the sequential newlines?
I tried this...
<cffile action = "read"
file =
"e:\inetpub\webroot\real_estate_data\hmls\data\2008_0918_idx_custom\active_photos.txt"
variable = "active_photos" />
<cfset active_photos = #replace("active_photos",
"#chr(10)&chr(13)##chr(10)&chr(13)#", "", "All")#>
<cffile action = "write"
file =
"e:\inetpub\webroot\real_estate_data\hmls\data\2008_0918_idx_custom\active_photos_edited.txt"
output = "#active_photos#" />
That just gave me a file with the text, "active_photos", and a return symbol
after it...
Thoughts?
Rick
> -----Original Message-----
> From: Barney Boisvert [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 18, 2008 5:04 PM
> To: CF-Talk
> Subject: Re: How to parse a text file...
>
> Best bet would be to do listToArray() with newline as the delimiter,
> and then loop over the array and split each item on a tab.
>
> Though if you've already got LOAD DATA INFILE set up, why not just set
> up some REReplaces to sanitize the input file before import. Do
> things like replace sequential newlines with a single newline and
> such.
>
> cheers,
> barneyb
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312799
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4