[thelist] Stripping two VbCrLfs

Charles Roper reachme at charlesroper.co.uk
Thu Mar 21 13:47:03 CST 2002


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






More information about the thelist mailing list