[thelist] ASP Replace Problem

Joshua Olson joshua at alphashop.net
Thu Jan 17 11:36:26 CST 2002


Hi, my name is anal.  :)  A bunch of people responded to this email, but
nobody (including Matt) told the truth.  Therefore, everyone is grounded...
go to your rooms  :)

For the record:
character 13 is the carriage return,
character 10 is the linefeed,
therefore, vbCRLF is Chr(13) & Chr(10) and
vbCRLF & vbCRLF could indicate paragraph breaks.

You can hand roll the replacement thusly:

Replace(foo, Chr(13) & Chr(10) & Chr(13) & Chr(10), "</p><p>") or
Replace (foo, vbCRLF & vbCRLF, "</p><p>")

Usually, you'll want to preface with <p> and end with </p>, so the full code
should be

bar = "<p>" & Replace(foo, vbCRLF & vbCRLF, "</p><p>") & "</p>"

Often, you'll want to replace additional line feeds with <br>, so, we now
have:

bar = "<p>" & Replace(Replace(foo, vbCRLF & vbCRLF, "</p><p>"), vbCRLF, "<br
/>") & "</p>"

Have a wonderful day,
-joshua





More information about the thelist mailing list