• Login
Community
  • Login

Skipping Blank Lines?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 4 Posters 3.1k Views
Loading More Posts
  • 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.
  • D
    Daily Roe
    last edited by Sep 28, 2016, 3:38 PM

    I have 7253 lines. I need to have all the words in a paragraph on one line. I made a macro will move all words in a paragraph, but i need to skip the empty/blank lines that seperate paragraphs.

    1. “Doss,” said Mrs. Stirling, “what do you mean by taking off your hat? Put it on instantly!”
    2. Valancy put it on instantly. She was cold with fear lest Dr. Stalling should immediately summon her up front again.

    I need my macro to skip line 2 in the example above. Can this be done?

    C 1 Reply Last reply Sep 29, 2016, 12:42 AM Reply Quote 0
    • C
      Claudia Frank @Daily Roe
      last edited by Sep 29, 2016, 12:42 AM

      @Daily-Roe

      only if the pattern would be the same over the whole text otherwise
      you would need some regex or script to do the job. Or you find some similarity
      and, maybe, can use bookmarks !?

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • G
        gerdb42
        last edited by Sep 30, 2016, 8:11 AM

        You may try the following RegEx for searching: (?<=\w)\R(?!\R). Replace with empty Text. This will remove any line break preceded by a word character and not followed by another line break. You may also try \S (non-space-characters) for \w.

        1 Reply Last reply Reply Quote 0
        • V
          Vasile Caraus
          last edited by Sep 30, 2016, 5:28 PM

          Search:
          \s+(.*?)

          Replace with:
          (Leave one Space)

          Or another solution:

          Search:
          \R
          Replace by:
          (Leave one space)

          1 Reply Last reply Reply Quote 0
          3 out of 4
          • First post
            3/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors