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 342 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.
    • MaxM
      Max
      last edited by Max

      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

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Max
        last edited by

        @Max

        In Regular expression Search mode, search for:

        \r(?!\n)

        and replace with nothing.

        1 Reply Last reply Reply Quote 3
        • MaxM
          Max
          last edited by

          Marvellous. Thank you!

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