Sean

[Re]Find has an optional 3rd parameter: [Start position].

You can use this to create a loop through the target of the [Re]Find.

Dick

For Example:

   <CFSET EOL = chr(13) & chr(10)>
   <CFSET Transformed =
   "line 1" & EOL &
   "line 2" & EOL &
   "line 3" & EOL &
   "line 4">

   <CFSET LineEndList="">
   <CFSET StartPos = 1>
   <CFSET ThisLineEnd = 1>
   <CFLOOP CONDITION="#ThisLineEnd# NEQ 0">
     <CFSET ThisLineEnd = Find(EOL, Transformed, StartPos)>
     <CFIF ThisLineEnd>
       <CFSET LineEndList = ListAppend(LineEndList, ThisLineEnd)>
       <CFSET StartPos = ThisLineEnd + 1>
     </CFIF>
   </CFLOOP>

   <CFOUTPUT>
   |# Transformed#|<BR>
   This is it...#LineEndList#
   </CFOUTPUT>



>I have a file that I am reading with CFFILE.  The variable of which is =
>"transformed".
>The following will give me the position of the first line break.
>
><cfset firstline =3D #REFind("#chr(13)##chr(10)#", transformed)#>
>
>How would I find the position of all line breaks if I did not know how =
>many lines a file was going to have?
------------------------------------------------------------------------------
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.

Reply via email to