[thelist] Stripping two VbCrLfs

Feingold Josh S Josh.S.Feingold at irs.gov
Thu Mar 21 13:52:01 CST 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Would the replace function work?

replace("TEXT",VbCrLf & VbCrLf,VbCrLf)

I never have tried it with non-characters, but I would start there.

Josh


-----Original Message-----
From: Charles Roper [mailto:reachme at charlesroper.co.uk.treas.gov]
Sent: Thursday, March 21, 2002 2:47 PM
To: thelist at lists.evolt.org
Subject: [thelist] Stripping two VbCrLfs


Hi,

I'm writing to a text file using the FileSystemObject in ASP/VBscript by
submitting a form with a textarea. How do I strip out two instances of
VbCrLf when writing to the text file and replace it with just the one
VbCrLf? What's happening is when a user hits return twice to create a
paragraph in the text area, it's inserting two VbCrLfs, whereas I need
the text file to have only one VbCrLf after each paragraph.

So, for example, this is what the text file is being written like now:

Line of text

Line of text

Line of text

But I want it to be written like so:

Line of text
Line of text
Line of text

Preferably I'd like to replace the VbCrLfs when writing to the file
rather than reformatting it after it's been written.

Thanks in advance.

Charles Roper



--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !



More information about the thelist mailing list