Results 1 to 38 of 38

Thread: [RESOLVED] Remove trailing NewLines from string

Threaded View

  1. #16
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: Remove trailing NewLines from string

    You can use Regex.Replace, although I still am not quite sure what you meant by your post just above. Also, Environment.Newline should be used instead of vbcrlf...
    VB Code:
    1. Dim MyLines As String = "this " & Environment.NewLine & Environment.NewLine & _
    2.                                 "and that" & Environment.NewLine & " and another!"
    3. MessageBox.Show(System.Text.RegularExpressions.Regex.Replace(MyLines, Environment.NewLine, ""))
    Last edited by gigemboy; Apr 15th, 2006 at 02:21 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width