On 6/18/02, Jamie Jackson penned: >I've got several large text files to manipulate. > >Any line that looks like this: >DE*MY TITLE / HERE > >I need to make into this: >DE*My Title / Here > >I hope there's an easier way to do this than follows: >1. CFFILE read the data >2. Loop a REFind function with "return subexpressions" on, creating an >array of structures of arrays >3. Loop the array of structures of arrays and do an "Insert" function >that replaces the string with a "title case" UDF > >Hmm... I just thought of a more appealing way: I could loop through >the file contents one line at a time, and do a CFFILE "append" to >another file, as I parse each line.
Maybe I'm reading this wrong, but can't you just go: <cffile action="read" file="myfile.txt" variable="oldcontent"> <cfset newcontent = replace(oldcontent, "DE*MY TITLE / HERE", "DE*My Title / Here", "ALL"))> <cffile action="write" file="myfile.txt" output="#newcontent#"> -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

