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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to replace "CR" and "LF" with "SP" character

Status
Not open for further replies.

dxn131

Technical User
Mar 11, 2002
1
CA
I am looking for a solution in VBscript to replace <CR> and <LF> by a <SP> character when I am writing a replacement (<SP>) character to a text file.

Can you show me how?

Regards.
 
Use Replace function. Not sire what <SP> is.
Examples.
strW = Replace(strW,Chr(13),&quot; &quot;) ' Cr
strW = Replace(strW,Chr(10),&quot; &quot;) ' Lf
strW = Replace(strW,Chr(13) & Chr(10) ,&quot; &quot;) ' CrLf with 1 space
strW = Replace(strW,Chr(13) & Chr(10) ,&quot; &quot;) ' CrLf with 2 spaces Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top