Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    2
    3
    94
    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.
    • Max
      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 Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        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
        • Max
          Max last edited by

          Marvellous. Thank you!

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors