• Login
Community
  • Login

Find a Carriage Return only and delete. Whilst Ignoring all Carriage Return Line Feeds within the file

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 347 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.
  • M
    Max
    last edited by Max Jan 6, 2020, 12:05 PM Jan 6, 2020, 12:05 PM

    Hi

    I’ve a rather large file with most of the data within having CRLF at the end of the row.

    I would like to find the lines of data with just a CR and delete them to shift my data onto the correct line.

    I’ve got this Find/Replace regular expression off another topic on this forum that works the other way around but manipulating it seems to find CRLF when I want to find CR only and delete

    ^(.*?|^\r)\n

    Any help would be appreciated.
    Thank you
    Max

    A 1 Reply Last reply Jan 6, 2020, 12:43 PM Reply Quote 0
    • A
      Alan Kilborn @Max
      last edited by Jan 6, 2020, 12:43 PM

      @Max

      In Regular expression Search mode, search for:

      \r(?!\n)

      and replace with nothing.

      1 Reply Last reply Reply Quote 3
      • M
        Max
        last edited by Jan 6, 2020, 1:40 PM

        Marvellous. Thank you!

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