Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

clrf-line read

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
im trying to edit a text file so that it places a character at the end of each line.

but i'm having trouble reading return carriages is there anyway to handle this in cf?

ex.
asd asdfd dfg fdgg fdg dfg
ksodfkok sdofkosk foksf ok

the script should produce:
asd asdfd dfg fdgg fdg dfg|
ksodfkok sdofkosk foksf ok|


thanks in advance....
 
Try using replace to do the job:

<cfset NewField = Replace(Variables.OldField, &quot;#chr(13)##chr(10)#&quot;, &quot;|&quot;, &quot;ALL&quot;)>

This should work to change your line breaks to the pipe character. Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top