Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Remove Empty Lines

Remove Empty Lines

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NANCO
    wrote on last edited by
    #1

    is there an easy way to remove empty lines in Richtextbox? any help will be greatly appreciated. I have been trying do this on my own for months Couldn't find a single easy way of doing this. I tried converting the text to rtf then removed all "/par" and then reconverting it to text. it worked well to a certain extent but was not perfect. thanx

    M 1 Reply Last reply
    0
    • N NANCO

      is there an easy way to remove empty lines in Richtextbox? any help will be greatly appreciated. I have been trying do this on my own for months Couldn't find a single easy way of doing this. I tried converting the text to rtf then removed all "/par" and then reconverting it to text. it worked well to a certain extent but was not perfect. thanx

      M Offline
      M Offline
      MohammadAmiry
      wrote on last edited by
      #2

      I think empty lines have a format like '\par??\par', so you may look for this syntax and replace it with '\par'

      N 1 Reply Last reply
      0
      • M MohammadAmiry

        I think empty lines have a format like '\par??\par', so you may look for this syntax and replace it with '\par'

        N Offline
        N Offline
        NANCO
        wrote on last edited by
        #3

        sorry that was just a typing mistake in the message and I did use it the same way before. my problem is when I search for "\Par" using whole word option it finds it; and also finds what ever that looks like this "{\Par"(even if I did use the whole word option it doesn't find; just! "\Par". If it is "a\Par" it doesn't matter but if it is other then numbers or alphabetic characters; it just finds it and gets rid of it). thanx for u'r help anyway.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups