Finding newlines

Results 1 to 2 of 2

Thread: Finding newlines

  1. #1
    Join Date
    Dec 1969

    Default Finding newlines

    Hi,<BR><BR>how can I search my textarea variable for newlines in VBScript?<BR><BR>Thanks, baaf.

  2. #2
    Join Date
    Dec 1969

    Default RE: Finding newlines

    In VBScript, new lines are represents by the code &#039;vbcrlf&#039;<BR><BR>So, to determine if your &#039;textarea variable&#039; or string contains a line break, you could try something like:<BR><BR>If InStr(string, vbcrlf) Then Response.Write "Linebreak found"<BR><BR>Or, if youre displaying the string on a HTML page and wish to show the linebreaks, try:<BR><BR>strString = Replace(string, vbcrlf, "&#60;BR&#62;")<BR>Response.Write strString<BR><BR>I hope that all makes sense :)

Posting Permissions

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