carrigae return

Results 1 to 2 of 2

Thread: carrigae return

  1. #1
    Join Date
    Dec 1969

    Default carrigae return

    This might be simple for you, but I just can&#039;t figure it out. <BR>How can I replace each occurrence of a &#039;carrige return&#039; or &#039;new line &#039; pattern in a string with the HTML code <BR> ? The string I want to change I have got from an Database. The input field was created and sended send by an html-form .

  2. #2
    Join Date
    Dec 1969

    Default RE: carrigae return

    pass your string to a function like this<BR><BR>function replaceCarriageReturnWithHTML(thisString)<BR><BR> if thisString &#060;&#062; "" then <BR> dim re, a <BR> Set re = new RegExp<BR> re.Pattern = chr(13) <BR> re.Global = true <BR> replaceCarriageReturnWithHTML = re.Replace(thisString, "<BR>"&chr(13)) <BR>else <BR> replaceCarriageReturnWithHTML = "" <BR>end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts