> No.. Grabbing variable responses from old text files that were stored
> using a funky form design. The only thing unique about the responses is
> that they all have "~" around each response. However, we have to sort
> thru all of it, and the files are HUGE. So it becomes a real bear to
> get them all out and stored.
How about:
<cffile action="READ" file="[your path here]" variable="fileText">
<cfset varList="">
<cfset startPos=1>
<cfloop condition="REFindNoCase("~[^~]+~", fileText, startPos)">
<cfset match=REFindNoCase("~[^~]+~", fileText, startPos,"TRUE")>
<cfset varList=varList & "," & Mid(fileText, match.pos[1],
match.len[1])>
<cfset startPos=match.pos[1]+match.len[1]>
</cfloop>
Haven't tested it, but maybe a good starting place. Should return a
comma-separated list of the variables.
hth,
- Gyrus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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